You need to sign in to do that
Don't have an account?
Miranda L 2
error for "recordId": "Class.System.JSON.deserialize
{ "statusCode": 400, "status": "Error", "recordReferences": [], "errors": [ { "recordId": "Class.System.JSON.deserialize: line 15, column 1\nClass.GlobalWS.processTable: line 33, column 1", "errorMessage": "Illegal value for primitive" } ] }please help me
You'd need to check the "Class.GlobalWS.processTable" class and see what value it is expecting vs what value is being passed by the server/application.
This JSON.deserialize error means you're getting an incorrect value for the expected type in the class definition.
For example say you had a class like so:
But the JSON you were passing was something like:
You would get the same JSON.deserialise error because it would be expecting an Integer for "age" but instead got a String.
at line 33 for class GlobalWS
I tried with this also getting same error
public list<string> product_items;
I have done
and assigning Without this field "product_items":["Dh"] in JSON getting folliwing result
JSON file
could you please suggest
If that's the exact JSON you get passed to you then you should only really need something basic like this for your wrapper class:
Then you should deserialize the whole JSON string result as that class:
Then you can loop through InvoiceClass.records to create your actual invoice sObjects to insert!