Tuesday, June 25, 2019

Record type/field ids not showing on autocomplete in SuiteCloud IDE

There are instances that some of the fields/record types does not appear in the list of autocomplete suggestions using SuiteScript API such as nlapiSearchRecord or nlapiLoadRecord this is because fields/record types is not included in the SuiteScript Record Browser.
 

Sample scenario below:


* Load a sales order record and get the value of Shipping Carrier using getFieldValue method


var rec = nlapiLoadRecord('salesorder',1234)


"shipcarrier" is not on the list of autocomplete


* If you check the SuiteScript Record Browser , this field is included in the line item but not as body field which is the possible reason why it is not showing on the autocomplete.


rec.setLineItemValue('item','shipcarrier')

 

 

No comments:

Post a Comment