function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RoshRosh 

How to use metadata API

How to use metadata API. I have generated Metadata WSDL through Develop >> Api, and created an apex class through it. The generated apex class contains lot of wrapper classes. Actually I am confused how to start with it. As per my requirement I have to add components to Home Page Layout through Apex, and my client has suggested to use Metadata API.

- Is it necessary to generate class through WSDL or there is other way also to use Metadata API.
- There are wrapper classes named "HomePageLayout" and "HomePageComponent" in the generated class but I have no idea how to use them.

Thanks in Advance
Roshan
SFDC_DevloperSFDC_Devloper
Hi Rosh,

I hope the below link will help you.....

http://andyinthecloud.com/2013/10/27/introduction-to-calling-the-metadata-api-from-apex/


If this solves your problem, kindly mark it as the best answer.

Thanks,
Rockzz