Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
What is the SuiteScript UNEXPECTED_ERROR when transforming POs to Receipts?
NS throws "An unexpected SuiteScript error has occurred" on the following logic.
I found that "newRecord.setSublistValue" part fails but the log is completely useless for finding what is wrong with it.
Are there any points of the specification's limitation?
FYI, I confirmed "locationId" and other id are currently gotten.
const newRecord = record.transform({
fromType: fromRecord,
fromId: fromRecordId,
toType: toRecord,
});
newRecord.setSublistValue({
sublistId: "item",
fieldId: "location",
line: 1,
value: locationId,
});
newRecord.save({
enableSourcing: true,
});
0