What is the simplest & easiest way available to access the Metadata API from APEX (accessing the current Org) ?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Salesforce have released direct support from Apex with Summer 17. Refer to: https://developer.salesforce.com/blogs/engineering/2017/05/introducing-apex-metadata-api.html
If you had simply searched google for your very question title, you would have found the answer:
Apex Wrapper Salesforce Metadata API
In addition to the documentation in this README, the following blogs also cover the library.
- Automating the Creation of Flow Screens with Apex Metadata API
- Apex Metadata API Q&A
- Apex Metadata API Streamlined and Simplified for Summer’14
- Post Install Apex Metadata API Configuration Solved!
- Apex Metadata API and Spring’14 : Keys to the Kingdom!
- Introduction to calling the Metadata API from Apex.
- Spring’14 Pre-Release : Updating Layouts in Apex
- “Look ma, no hands!” : Automating Install and Uninstall of Packages!
- Scripting the Apex Metadata API and Batch Apex Support
- Apex Metadata API Spring’13 Update : Org Settings Access
This API mirrors as much as possible the API types and operations described in the standard documentation. The behaviour and functionality provided is also as described in the Salesforce documentation, in terms of what metadata is available and accessable via the specific operations.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0