Sunday, May 10, 2020

An undeclared property 'ccs_quoteid' which only has property annotations in the payload but no property value was found in the payload.


I was getting this weird error, when trying to update the lookup attribute of a quote to my existing custom entity.

I generated the code from Rest API builder.

Later, I found that it is expecting the OData naming convention and not the original schema name that we see under customization.

var entity = {};
entity.ccs_name = opportunityTitle;
entity["ccs_QuoteId@odata.bind"] = "/quotes(" + Opportunity.generatedquoteId + ")";

// code with issue
// entity["ccs_quoteid@odata.bind"] = "/quotes(" + id + ")";

Try to observe the name of your lookup attribute by browsing the OData service and change the name accordingly.







I hope this will solve this issue.


Thanks
Vipin Jaiswal
vipinjaiswal12@gmail.com

No comments: