To use this method, pass in an object that contains the field ID, its type, and the value you want to set.
var cart = container.getComponent(‘Cart’);
var data = {
fieldId: “custbody_customerref”,
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.’);
});