Monday, March 25, 2019

Get the Referring URL field from the Partner record via SuiteScript even if it is not exposed

Since the referringurl has a set format (linkformat + Partner Code field), here is the alternate code the customer can use:

var rec = nlapiLoadRecord('partner', nlapiGetRecordId());
var x = rec.getFieldValue('partnercode');
var referral_URL = "http://shopping.netsuite.com/s.nl?c=TSTDRV874457&partner=" + x;

//replace TSTDRV874457 with your NetSuite account number

No comments:

Post a Comment