Robert Vice
12/27/2022, 11:37 AMStuart Anderton
12/27/2022, 1:38 PMRobert Vice
12/27/2022, 1:38 PMRobert Vice
12/27/2022, 1:39 PMtype: "error.SuiteScriptError",
name: "INVALID_RCRD_TRANSFRM",
message: "You have entered an invalid default value for this record transformation operation.",
cause: {
type: "internal error",
code: "INVALID_RCRD_TRANSFRM",
details: "You have entered an invalid default value for this record transformation operation.",
userEvent: null,
}
Robert Vice
12/27/2022, 1:41 PMfromType: "salesorder"
toType: "itemfulfillment"
fromId: 328254
defaultValues:
{
shipgroup: 1,
inventorylocation: 19
}
Robert Vice
12/27/2022, 1:41 PMRobert Vice
12/27/2022, 1:42 PMStuart Anderton
12/27/2022, 1:54 PMRobert Vice
12/27/2022, 1:54 PMRobert Vice
12/27/2022, 1:55 PMRobert Vice
12/27/2022, 4:32 PMRobert Vice
12/27/2022, 4:43 PM328254 === recordId;
'salesorder' === recordType.toString();
19 === inventorylocation;
1 === shipgroup;
undefined === itemfulfillment;
Stuart Anderton
12/27/2022, 4:57 PMStuart Anderton
12/27/2022, 5:02 PMStuart Anderton
12/27/2022, 5:06 PMRobert Vice
12/27/2022, 5:59 PMRobert Vice
12/27/2022, 5:59 PMStuart Anderton
12/27/2022, 6:00 PMRobert Vice
12/27/2022, 6:00 PMRobert Vice
12/27/2022, 6:01 PMRobert Vice
12/27/2022, 6:01 PMRobert Vice
12/27/2022, 6:02 PMRobert Vice
12/27/2022, 6:04 PMStuart Anderton
12/27/2022, 6:09 PMRobert Vice
12/27/2022, 6:14 PMcause: {
type: "internal error",
code: "VALID_LINE_ITEM_REQD",
details: "You must have at least one valid line item for this transaction.",
userEvent: null,
new error, but still not usefulStuart Anderton
12/27/2022, 6:14 PMRobert Vice
12/27/2022, 6:15 PMRobert Vice
12/27/2022, 6:15 PMRobert Vice
12/27/2022, 6:17 PMStuart Anderton
12/27/2022, 6:24 PMRobert Vice
12/27/2022, 6:25 PMRobert Vice
12/27/2022, 6:25 PMStuart Anderton
12/27/2022, 6:27 PMRobert Vice
12/27/2022, 6:27 PMRobert Vice
12/27/2022, 6:28 PMStuart Anderton
12/27/2022, 6:33 PMRobert Vice
12/27/2022, 6:37 PMRobert Vice
12/27/2022, 6:37 PMRobert Vice
12/27/2022, 6:38 PMconst recIdMatch = 328254 === recordId;
const recTypeMatch = 'salesorder' === recordType.toString();
const invLocMatch = 19 === recordObject.defaultValues.inventorylocation;
const shipGroupMatch = 1 === recordObject.defaultValues.shipgroup;
const ifMatch = undefined === recordObject.defaultValues.itemfulfillment;
log.debug({
title: 'Match',
details: `Id [${recIdMatch}] Type [${recTypeMatch}] Location [${invLocMatch}] Group [${shipGroupMatch}] IF [${ifMatch}]`
})
// Test without multiline enabled
const defValues = { inventorlocation: recordObject.defaultValues.inventorylocation };
try {
newIfRecord = record.transform({
fromType: recordType,
fromId: recordId,
toType: record.Type.ITEM_FULFILLMENT,
isDynamic: true,
defaultValues: defValues
});
Stuart Anderton
12/27/2022, 6:39 PMRobert Vice
12/27/2022, 6:39 PMRobert Vice
12/27/2022, 6:40 PMRobert Vice
12/27/2022, 6:40 PMRobert Vice
12/27/2022, 6:43 PMStuart Anderton
12/27/2022, 6:48 PMRobert Vice
12/27/2022, 6:49 PMStuart Anderton
12/27/2022, 6:53 PMStuart Anderton
12/27/2022, 7:01 PMStuart Anderton
12/27/2022, 7:03 PMRobert Vice
12/27/2022, 7:24 PMRobert Vice
12/27/2022, 7:24 PMStuart Anderton
12/27/2022, 7:25 PMRobert Vice
12/27/2022, 7:25 PM