You need to sign in to do that
Don't have an account?
How to retrieve Create Date and Modified date of all fields of a custom object using Apex or Api
Hi guys,
I am new to Apex and APIs. I am trying to retrieve Create Date and Modified date of all fields of a custom object. I have already tried the below
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_describe.htm
When I paste the below API request in the browser
https://xxxx.salesforce.com/services/data/v20.0/sobjects/Account/describe/ -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxx"
I get an error saying "This XML file does not appear to have any style information associated with it. The document tree is shown below.
<errorCode>INVALID_SESSION_ID</errorCode>
<message>Session expired or invalid</message>
"
Does this work for custom objects? Can someone point full material for this (how to include additional parameters in the API request etc)
1 Ans-
You have to do a API call. It cannot be done by pasting the URL on browser.
First you have to get the access token then you have to do a callout.
Something like this:
2 Ans-
Yes it will work for standard as well as custom objects.
One more URL for you -
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/sobject_describe_with_ifmodified_header.htm
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help.
Thanks for that but where do I run the above code? In the developer console?