Guest User

Untitled

a guest
Oct 10th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         // get the id of the sales order where item fulfillment is created from
  2.         var soid = <id of the sales order>;
  3.  
  4.         // set the internal id of the financial location custom segment
  5.         var sofl = <internal id of the custom segment>;
  6.  
  7.         // get the value of the financial location from the sales order
  8.         var financial_location = nlapiLookupField('salesorder', soid, sofl);
  9.  
  10.         // load the item fulfillment record
  11.         var itemfulfillment = nlapiLoadRecord('itemfulfillment', nlapiGetRecordId());
  12.  
  13.         // set the value of the financial location from the Sales Order to the Item Fulfillment
  14.         itemfulfillment.setFieldValue(sofl, financial_location);
  15.  
  16.         // Save the record
  17.         nlapiSubmitRecord(itemfulfillment);
Advertisement
Add Comment
Please, Sign In to add comment