Version: eXtendPS-DE 1.2.9 and above
Audience: Administrator, Developer
Possible Cause
This error typically occurs when an autonomous vendor bill record is generated from an invoice response record and the location field is set as mandatory on the vendor bill record.
Solution
To resolve this issue, a NetSuite administrator or developer needs to create a function called
beforeBillRecordSave()
in the "suite_promo_transformers.js" file.This function will define the location that should be set on the vendor bill record. An example of the function structure is provided below:
/*** @param {Object} args* @prop {Object} args.vendorBillRecord* @prop {Object} args.invoice* @prop {Object} args.poId*/function beforeBillRecordSave(args) {var vendorBillRecord = args.vendorBillRecord;var invoice = args.invoice;var poId = args.poId;// Please specify the location here to set it on the body level.vendorBillRecord.setValue({ fieldId: 'location', value: '1' });}