Sunday, February 17, 2019

nlapiTransformRecord throws INVALID_INITIALIZE_REF error

nlapiTransformRecord throws INVALID_INITIALIZE_REF when transforming Sales Order Record to Invoice

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