function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
visualforce_devvisualforce_dev 

Adding more tabs to existing tabs of a custom Apps

Hi,

 

I tried to create a tab and include it to an app, but its overriding the existing tabs, but i need to include old set of tabs as well,

CustomTab ct = new CustomTab(); ct.setFullName("Object1__c"); ct.setCustomObject(true); ct.setFrameHeight(400); ct.setHasSidebar(true); ct.setMotif("Custom70: Handsaw"); ct.setMobileReady(false); ct.setLabel("Automati"); AsyncResult[] ars1 = msfdc.create(new Metadata[] { ct }); if(!apps) { CustomApplication ca = new CustomApplication(); ca.setFullName("Myapp"); ca.setLabel("Myapp"); ca.setTab(new String[] {ct.getFullName()}); UpdateMetadata updateMetadata1 = new UpdateMetadata(); updateMetadata1.setMetadata(ca); updateMetadata1.setCurrentName("Myapp"); AsyncResult[] wupdate18 = msfdc.update(new UpdateMetadata[] { updateMetadata1}); }

 

my code is attached.