3

I would like to modify the url of my Web Tab for each SF organization that my managed package is installed on. Is there a way to get and set the url of a Web Tab from Apex or the REST Api? Is there a SObject that stores the state of a Web Tab? If so, what is its name?

This question is similar but no apex code to modify the url was given.

If you want to learn more about Web Tabs, start by making one in your org.

2

I am taking a guess here :

Based on this question you can access the metadata api from apex as below :

Has anyone, ever, successfully invoked the Metadata API from within Apex?

In your case you need to be looking at customtab from here :

http://www.salesforce.com/us/developer/docs/api_meta/

Combining both might do the trick ")

MetadataService.MetadataPort service = createService();     
MetadataService.CustomObject CustomTab = new MetadataService.CustomTab();
CustomTab.URL = 'www.abc.com';
//not sure what else u might need to create a tab, required vals might be missing here.
MetadataService.AsyncResult[] results = 
    service.create(new List<MetadataService.Metadata> { CustomTab});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.