Update Custom Module Record
I am trying to update an existing record in a custom module.
When I try to get my modules, I see:
{
"content": "CustomModule1",
"gt": "4",
"id": ...,
"no": "6",
"pl": "Cohorts",
"sl": "Cohort"
}
So I know that the module is called "CustomModule1". I want to update a custom field on this custom module, so I pulled the fields:
{
"customfield": "true",
"dv": "Cohort Status",
"isreadonly": "false",
"label": "Cohort Status",
"maxlength": "120",
"req": "false",
"type": "Pick List",
"val": [
...
]
},
When I try to update, the XML I pass is:
<CustomModule1>
<row no="1">
<FL val="Cohort Status">${this.status}</FL>
</row>
</CustomModule1>
I receive this error:
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/crm/private/xml/CustomModule1/updateRecords"><error><code>4835</code><message>Unable to parse XML data</message></error></response>
What is missing in my XML? I am using node to POST to the API, and I URI encode my XML. This works with inserting leads, so I am not sure what would be different about updating a record?