nathanw
05/25/2021, 6:58 PM// Create Inventory Adjustment
var inventoryAdjustmentId = createInventoryAdjustment()
// Link Assembly Build to Inventory Adjustment
assemblyBuildRecord.setValue({
fieldId: "custbody_linked_inv_adj",
value: inventoryAdjustmentId,
ignoreFieldChange: true,
});
assemblyBuildRecord.save();
The Custom Field custbody_linked_inv_adj
is a Transaction Body Field of Type: List/Record and List/Record: Transaction.
I get the following Error,
{
"type": "error.SuiteScriptError",
"name": "YOU_CANNOT_CALL_1_METHOD_ON_SUBRECORD_FIELD_2",
"message": "You cannot call getFieldValue method on subrecord field: inventorydetail.",
"cause": {
"type": "internal error",
"code": "YOU_CANNOT_CALL_1_METHOD_ON_SUBRECORD_FIELD_2",
"details": "You cannot call getFieldValue method on subrecord field: inventorydetail.",
"userEvent": "aftersubmit",
"notifyOff": false
},
"id": "",
"notifyOff": false,
"userFacing": false
}
Any thoughts?Sandii
05/25/2021, 8:06 PMcreateInventoryAdjustment()
Sandii
05/25/2021, 8:08 PMafterSubmit
on assembly builds that is causing this problem.nathanw
05/25/2021, 8:31 PMnathanw
05/25/2021, 8:32 PMnathanw
05/25/2021, 8:32 PMSandii
05/25/2021, 8:49 PMnathanw
05/25/2021, 10:09 PM