I want "Storage usage" fields like data storage, field storage of a Salesforce Org to custom page of another Salesforce Org. Can anybody suggest someway around?
closed as off-topic by Tushar Sharma, Martin Lezer, Dave Humm, Vigneshwaran G, battery.cord Sep 26 '17 at 12:44
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Tushar Sharma, Martin Lezer, Dave Humm, Vigneshwaran G, battery.cord
You will need a Tooling API callout. You have 2 options, depending on how you want to store credentials.
- "Push data": In source org (the one which storage you want to see) make the REST callout to get the data, then use some other technique (another callout? Outbound Message? Salesforce-to-Salesforce?) to post this data to target org. You don't need credentials for source org (valid Session ID is enough) but you might need credentials for target org.
- "Pull data": From target org make a call into the source org's Tooling API.
As for the actual REST resources which you need to call: