Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
dataweave update netsuite custom field
%dw 1.0
%output application/java
---
[{
internalId: payload.internalId,
itemList: {
item: [{
amount: payload.itemList.item[0].amount as :number,
item: {
internalId: "520"
},
customFieldList: {
customField: [{
SelectCustomFieldRef__custcol_location_z_suite: {
internalId: "27",
name: "MMR"
},
SelectCustomFieldRef__custcol_location_a_suite: {
internalId: "23",
name: "MMR"
},
SelectCustomFieldRef__custcol_region: {
name: "DTLA"
},
BooleanCustomFieldRef__custentityzuoraautopay: "false",
DateCustomFieldRef__custcol_wil_estcompdate: now,
SelectCustomFieldRef__custcol_region: {
name: "something"
},
{
StringCustomFieldRef__custbody40:payload.invoiceNumber
}
}]
}
}],
replaceAll: true
}
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment