Lucas
06/25/2025, 7:33 AMvar cart = container.getComponent('Cart');
var data = {
fieldId: "custbody_test_field",
type: "string",
value: "C123456"
}
cart.setTransactionBodyField(data).then(function() {
console.log(data.fieldId + ' was set to ' + data.value);
}).fail(function(error) {
console.log('setTransactionBodyField failed.');
});
Any of the following circumstances will cause this method to fail and return an error:
• If there are no transaction body fields on the page.
• If the specified transaction body field is not on the page.
• If the value of value
does not match the specified type
in the TransactionBodyFieldData object.
• If the value of type
in the TransactionBodyFieldData object does not match the field type in NetSuite.Steve Goldberg
06/25/2025, 10:49 AM