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
vasharmavasharma 

Is there any way in Apex to fetch the Metadata of an Object in String/Xml format

Hello Friends ,

 

My Requirement is to write a webservice in Apex which fetch the Metadata of SObject and return it in the form of Xml or in String . Please help to to achieve this functionality.

 

Thanks in advance.

 

Varun Sharma

bob_buzzardbob_buzzard

You don't have access to the metadata via Apex, you have to use the metadata api.  The metadata api is a web service api though, so you should be able to satisfy your requirements.

DellaStreetDellaStreet

Varun,

 

Did you ever find a way to do that?

If so, can you share please?

 

Thanks!

ds