Sample Script:
var invoice = nlapiTransformRecord('salesorder', 1370, 'invoice'); // where 1370 is Internal ID of Sales Order
nlapiSubmitRecord(invoice );
To fix this navigate to:
(1) Setup > Accounting > Preferences > Set Up Accounting > Order Management tab > Invoicing
(2) Enable the Invoice in Advance of Fulfillment preference
(3) Save the Preference
After saving the preference, the above sample script should be able to transform Sales Order.
No comments:
Post a Comment