Filter the Digital Certificate List by Subsidiary and File Type

The following sample shows how to filter the Digital Certificates list by subsidiary and by file type.

Note:

This sample script uses the require function so that you can copy it into the SuiteScript Debugger and test it. You must use the define function in an entry point script (the script you attach to a script record and depoly). For more information, see SuiteScript 2.x Script Basics and SuiteScript 2.x Script Types.

          /**
 * @NApiVersion 2.x
   */
require(['N/certificateControl'],
      function(certificateControl){
         var all = certificateControl.findCertificates();
         var specificType = certificateControl.findCertificates({
              type: 'PFX'
         });
         var specificSub = certificateControl.findCertificates({
              subsidiary: 93
         });
         var specificTypeAndSub = certificateControl.findCertificates({
               type: 'PFX',
               subsidiary: 93
         }); 

        

General Notices