SAP Knowledge Base Article - Public

3024607 - Error in Payload while updating Custom Field in Odata Service

Symptom

While using Post in Odata Service you receive below error message:

Error : Property 'XXXX_KUT' at offset 'YY' is invalid

Environment

SAP Cloud for Customer

Reproducing the Issue

Patch Operation in IndividualCustomerCollection: (Example)

1.Created a custom KUT field Named as Z( Type - Indicator) in Customer BO, Using Individual Customer Collection ODATA, trying to update this field using below query.

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/IndividualCustomerCollection('')

Example Payload : {

"Z_KUT": "",

"Z_KUT1": "True"

}

It is not getting updated in any of the case though the metadata updatable property is true as well for this field, also passing TRUE/ True/ in this field.

Error : Property 'Z_KUT' at offset '' is invalid</message>

2. Created a custom BO, in that created a custom field (ZFlag, type - Indicator), trying to update this field using Custom Odata Service, but again it is not getting updated through same.

API and Payload :

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/hepticcustomercreation/HepticCustomerRootCollection

{

"CustomerName": "",

"CustomerLastName": "",

"PhoneNumber1": "* ",

"MobileNumber1": "* ",

"Z1":"Heptic Customer Testing",

"ZDate": "",

"ZFlag": "True"

}

Resulting error

Error : Property 'ZFlag' at offset '' is invalid</message>

Cause

Issue is with incorrect payload. Boolean value in the payload is sent as "True" but it should be sent as true.

Resolution

It should be in lower case and without quotes.

Keywords

Property, OData, error, offset, Invalid, Data , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer core applications 2102