Scenario

As per Issue: 505122, the SuiteScript API nlapiSubmitField does not set the value on custom fields applied to the Inbound Shipment record. However, the following workaround can be used to overcome this limitation till the issue is resolved.

Solution

1. Load the required Inbound Shipment record;
2. Set the value of the custom field;
3. Submit the record;

Sample code:

SuiteScript 1.0

var rec = nlapiLoadRecord('inboundshipment',shipmentId);
rec.setFieldValue('custrecord_ml_has_been_sent','T');
nlapiSubmitRecord(rec);

SuiteScript 2.0

require(['N/record'],function(record){‌
var rec = record.load({‌type:record.Type.INBOUND_SHIPMENT,id:1});
rec.setValue({‌fieldId:'custrecord11',value:true});
rec.save()
});
Last modified: 29/08/2023

Author

Comments

Write a Reply or Comment

Your email address will not be published.