How to get the logo of the NetSuite Account using script

Add the config module in the script

const getLogo = () => {           

try {               

let configRecObj = config.load({                   

type: config.Type.COMPANY_INFORMATION               

});               

let fileID = configRecObj.getValue({                   

fieldId: ‘formlogo’               

})               

let formLogo = file.load({                   

id: fileID             

});               

let netSuiteDomain = configRecObj.getValue({ fieldId: ‘appurl’ });             

let imageURL = netSuiteDomain + formLogo.url;               

return imageURL;           

}           

catch (error) {               

log.error(“error@getLogo”, error);             

  return ”;           

}     

  }

Leave a comment

Your email address will not be published. Required fields are marked *