Is there any way to dynamically populate user-defined field value in SalesInvoice. I'm using REST API, and I need JSON example to add value to field.
I'm using this to update the field.
{
"Attributes": [
{
"AttributeID": {
"value": "testattributeid"
},
"Required": {
"value": false
},
"Value": {
"value": "testvalue"
}
}
]
}
Please check the following help article: https://help-2020r1.acumatica.com/(W(27))/Help?ScreenId=ShowWiki&pageid=c5e2f36a-0971-4b33-b127-3c3fe14106ff
You can retrieve User Defined Fields using $custom parameter like that:
GET: {{sitename}}/entity/Default/18.200.001/SalesOrder?$custom=Document.AttributeCOLOR
As for updating the record, please check this article: https://help-2020r1.acumatica.com/(W(27))/Help?ScreenId=ShowWiki&pageid=7b104d41-3457-42f8-8010-165d9d931d3f
You can update the custom field in the record like that:
PUT: {{sitename}}/entity/Default/18.200.001/SalesOrder
BODY:
{
"Description": {
"value": "TEST"
},
"OrderNbr": {
"value": "SO005435"
},
"OrderType": {
"value": "SO"
},
"custom": {
"Document": {
"AttributeCOLOR": {
"type": "CustomStringField",
"value": "BLACK"
}
}
}
}