Friday, 9 February 2018

Apex Method to convert json format records into List of Sobject Records format

The following method will be useful when you are supplying list of records as input to the Apex Method.

1. Passing List of Sobjects to the Apex Method from the Lightning component is not allowed.
2. you should convert Sobject list by using JSON.stringify(yourSobjects) and the Apex method input should be string.
3. The following method will be useful to convert above json fromat string into List<Sobject>

Please find the following Code -

Thank You,

No comments:

Post a Comment