The requirement was to get the JSON Structure of an Account object for a third-party tool to Map the fields and Load the object fields.
The Structure needed was only to have the Object name and all the Field Names from the object like Below:
I simplified the way to extract the actual JSON Structure for an Object and get all the fields. Below I have given the code for getting the JSON structure for both API names of the fields and Label names.
Execute below in Execute Anonymous Window for JSON structure with API names of the fields
After executing, Open Raw Log and Capture the Unformatted structure of the object and use the Online JSON formatter to get the formatted version like below.
This will help us to save time in extracting the JSON Structure of SObject.
Login into the Sandbox that you would like to query on objects
After logging in, To the left hand side we can see all the objects. Need to double click on the object we want and we can see all the fields present in the object.
As per our requirement, we should enhance the query and add the conditions to get the results on the fields by clicking on query at the bottom.
Hope this tool helps in improving the querying time and checking the values on the fields.
In this Post, I would like to get the most important points on the Einstein Analytics to this Blog, through which one can understand it’s significance in improving the Business.