Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Help - Add components to Home Page Layout through Metadata API #24

Closed
roshan-sfdc opened this issue Apr 17, 2014 · 3 comments
Closed

Comments

@roshan-sfdc
Copy link

As per my requirement I have to add components to Home Page Layout through Apex, and my client has suggested to use Metadata API. I found two wrapper classes “HomePageLayout” and “HomePageComponent”,, but I am not able to add components to HomePageLayout . I am stuck in this big time. Could you help me please

@afawcett
Copy link
Contributor

Just to let you know, the recent upgrade to Spring'14 has taken a fair bit of my time this week, i will hopefully get round to looking at this next week. You may want to study the readAndUpdateLayout example in the MetadataServiceExamples.cls file in the meantime, although this is for Custom Object layouts, the general principle ought to work, though I've yet to confirm, just wanted to give you a possible lead in the meantime. Thanks.

afawcett pushed a commit that referenced this issue May 6, 2014
@afawcett
Copy link
Contributor

afawcett commented May 6, 2014

Here you go, I've worked up an example that will create a Home Page Component and add it to a Home Page Layout. https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls#L768

@afawcett afawcett closed this as completed May 6, 2014
@roshan-sfdc
Copy link
Author

@afawcett
Thanks a lot. This is exactly what I was looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants