You need to sign in to do that
Don't have an account?

Problem with ProfileTabVisibility for Standard Tabs using metadata API
Hi Guys,
I have a problem in setting ProfileTabVisibililty to standard tabs like "Accounts", "Leads".
Following code works fine with the custom tabs but not with standard tabs. Please help me as this is very urgent to me.
Profile p=new Profile();
p.setFullName(ProfileName);
ProfileTabVisibility ptv = new ProfileTabVisibility("__samp__c",TabVisibility.DefaultOn );ProfileTabVisibility[] tabVisibilities = new ProfileTabVisibility[] {ptv};
p.setTabVisibilities(tabVisibilities);
UpdateMetadata updateMetadata = new UpdateMetadata(ProfileName, p); System.out.println(p.getTabVisibilities(0).getTab());
AsyncResult[] ars= metadatabinding.update(new UpdateMetadata[] { updateMetadata });
This works fine.
But when I use standard tabs like "Account" it says
INVALID_CROSS_REFERENCE_KEY msg: In field: tab - no CustomTab named Account found
Anything that i set in ProfileTabVisibility is treated as CustomTab.
How can I set tab visibility for Standard Tab?
Quick reply would help me a lot.
Awaiting for your reply,
Praneeth.
This was asked a long long time ago but for anyone who stumbles across it,
for profile tab visibility has the following structure for standard Objects:
[{
'tab': 'standard-Account',
'visibility': 'DefaultOn'
},]
so I'd suggest trying to add the "standard-" infront of account when trying to do this.