+ Start a Discussion

Get list of fields of event page layout using metadata api


I'm trying to Get list of fields of event page layout using metadata api.
My code for the same is below:
MetadataService mBinding = new MetadataService();
mBinding.SessionHeaderValue = new sfMetaData.SessionHeader();
mBinding.SessionHeaderValue.sessionId = accessToken;
mBinding.Url = metadataURL;

var metadataType = "Layout";
var fullNames = new string[] { "Event-Event Layout" };
var readResult = mBinding.readMetadata(metadataType, fullNames);
Here, readResult doesn't give me data.
I've tried to use fullNames by appending ManagedPackage name followed by double underscore. But its not working.

Please suggest.
Shashi PatowaryShashi Patowary
I just checked from workbench.The page layout name is correct and I am able to see details. Please check if this way  that layout is accessible.

User-added image

Hi Shashi,

Thanks for the reply, I'm also able to get this result from "mBinding.listMetaData method of metaData api. 
But I'm trying to use "mBinding.readMetaData" method to read the event page layout data.

I need a list of fields available on event page layout using metadata api.

Please suggest.