You need to sign in to do that
Don't have an account?
AKASH DEEP
Need help on WebService Class
I am new in Integration please help me to "write an Apex class to import data from https://jsonplaceholder.typicode.com/users and store it in a created custom object" and please tell me how can I achieve this and what process should I follow to achieve the requirement.
Looks like you want to parse data from Json(https://jsonplaceholder.typicode.com/users) to apex. You can try online convertor https://json2apex.herokuapp.com/
To store data in custom object, retrieve that custom object record and use JSON.serialize() method. It will return a String containing JSON format of that record. Refer https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_System_Json.htm#apex_class_System_Json.
Also see https://salesforce.stackexchange.com/questions/195686/json-to-store-on-custom-object/195689 for more details
https://salesforce.stackexchange.com/questions/51856/insert-new-records-in-to-custom-object-from-json-string-in-salesforce
https://www.biswajeetsamal.com/blog/json-response-parsing-in-salesforce-apex/#
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
I am attaching the screenshot that what I had done yet and please guide me on what to do next
Wrapper Class:
Main Class:
Looks like the screenshot is missing.Are you seeing any error message? Can you run the below URI in the REST Explorer and see if it fetches the result you want?
/services/apexrest/ExternalUser/3
If this information helps, please mark the answer as best.Thank you