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

How do you get a Metadata object back from the API

I can't find a way to get a layout object back from the API.  I have been able to successfully create a page layout with the API, but I would like to read exisiting layouts to use for updates.  I have tried to use the Describe objects from the Data API, but they don't seem to have all of the information that I need to build a new layout.  I started with the DescribeLayoutResult object and drilled down to try to do a deep copy, but it's not a copy because the objects are so different, infact, I don't think that the Describe objects have all the information needed to create a new Object. Anyone know how to get a Layout object back from Salesforce?
IIRC, you'll need to use the retrieve call in the metadata API.
Any examples of this? The documentation doesn't really give any examples, except for the returned XML.
Chiyaan AnanthChiyaan Ananth

I am looking for the same.  Any examples or sample code or steps for this?


Ananth Chellathurai