Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // get the id of the sales order where item fulfillment is created from
- var soid = <id of the sales order>;
- // set the internal id of the financial location custom segment
- var sofl = <internal id of the custom segment>;
- // get the value of the financial location from the sales order
- var financial_location = nlapiLookupField('salesorder', soid, sofl);
- // load the item fulfillment record
- var itemfulfillment = nlapiLoadRecord('itemfulfillment', nlapiGetRecordId());
- // set the value of the financial location from the Sales Order to the Item Fulfillment
- itemfulfillment.setFieldValue(sofl, financial_location);
- // Save the record
- nlapiSubmitRecord(itemfulfillment);
Advertisement
Add Comment
Please, Sign In to add comment