+ Start a Discussion
mani toolmani tool 

Unable to see the Tab for an object using metadata api

Hi,

I have created the object in Salesforce using metadata api, i tried using metadata to create a tab for it but the tab is not visible in Salesforce.

MetadataService.MetadataPort service = new MetadataService.MetadataPort();  
service.SessionHeader = new MetadataService.SessionHeader_element();
service.SessionHeader.sessionId = UserInfo.getSessionId();
//system.debug('session id:'+UserInfo.getSessionId());
System.debug(UserInfo.getOrganizationId()+''+UserInfo.getSessionId().SubString(15));
//system.debug('session id:'+UserInfo.getSessionId());
System.debug(UserInfo.getOrganizationId()+''+UserInfo.getSessionId().SubString(15));
MetadataService.CustomTab  customField2 = new MetadataService.CustomTab();
        customField2.fullName = 'mani_pick__c';
        //customField2.icon='Heart';
        customField2.type = 'CustomTab';
        customField2.motif='Custom1:Heart';
        customField2.customObject=true;

List<MetadataService.SaveResult> results = service.createMetadata(new MetadataService.Metadata[] { customField2 });

Can anyone tell me where i am missing.
Akshay_DhimanAkshay_Dhiman
Hi Mani tool


go to setup->Quick Find Box-->Profile-->System Administrator-->Object Settings-->Tab Settings-->Default on


Link:

http://​https://salesforce.stackexchange.com/questions/2102/how-to-get-tab-visibilities-for-standard-tab

if this answer is useful for you please choose the best answer 


Thanks,
Akhsay