View Categories

Mandatory Field Error in Opportunity Capture API.

< 1 min read

Issue
Opportunity Capture API will give a 200 Ok response but if we check  the response we would see a mandatory exception. “ExceptionMessage”: “Field name : ‘mx_Custom_19’ of datatype : ‘String’ is mandatory.”

However when we search for the field mx_Custom_19 in the Opportunity Settings, we will not find any fields with that schema name. 





Reason
If we use the Opportunity Meta API and search for the field mx_Custom_19 we would see the field with the Display name as Comment of string data type and mandatory by default. 

This opportunity field is under the Status field and if we Enable comments on Status change check-box, then we have to pass this field in the Opportunity Capture API since this field is mandatory by default.




Note
The response status will be 200 OK, however the exception message will be shown as mandatory field missing and the Opportunity Capture against the lead will not be posted.

Solution
i) Add mx_Custom_19 in the payload with some value for the same.



OR 

ii) User can uncheck the Enable comments on Status change check-box



Scroll to Top