Cherwell Community

Update one or more values through API

Hi,

I'm trying to update one or more values from a record in a business object. I did get the needed values from this post request: /api/V1/getbusinessobjecttemplate

After getting the desired information I used them in this post request /api/V1/savebusinessobject to update the wanted value:

{
"busObId": "9421e82ac61555f73b5416492a858cfdc520e18f85",
"busObPublicId": "25",
"busObRecId": "942910670946757859c9fc4d2a9e5a7c9f85110b13",
"fields": [
{
"dirty": true,
"displayName": "Quantity",
"fieldId": "9421e87ba454a90bdbb32b4403b66311409497d993",
"name": "Quantity",
"value": "15"
}
]
}

However it is not working like expected, I get this error message: Could not retrieve Service Customer Assignment business object.

I also tried to change the request body to this:

{
"busObId": "9421e82ac61555f73b5416492a858cfdc520e18f85",
"fields": [
{
"dirty": true,
"displayName": "Quantity",
"fieldId": "9421e87ba454a90bdbb32b4403b66311409497d993",
"name": "Quantity",
"value": "15"
}
]
}

and to this:

{
"busObId": "9421e82ac61555f73b5416492a858cfdc520e18f85",
"fields": [
{
"dirty": true,
"displayName": "Quantity",
"fieldId": "BO:9421e82ac61555f73b5416492a858cfdc520e18f85,FI:9421e87ba454a90bdbb32b4403b66311409497d993",
"name": "Quantity",
"value": "15"
}
]
}

Both endet up in this error message: 

{
"busObPublicId": null,
"busObRecId": null,
"fieldValidationErrors": [],
"errorCode": "FIELDVALIDATIONERROR",
"errorMessage": null,
"hasError": true
}

I don't know what to do anymore...