0

I have created a custom list button on Contacts that can be redirected to a specific record type. I want the Contacts to be open in a new tab.

if (typeof(srcSelf) == 'function') { 
     srcUp("/003/e?RecordType=012F0000001EvIo&accid={!Account.Id}&ent=Contact&retURL=/{!Account.Id}","_blank"); 
}else{ 
     window.open("/003/e?RecordType=012F0000001EvIo&accid={!Account.Id}&ent=Contact&retURL=/{!Account.Id}","_blank"); 
}

with this I am able to open Contact as a Sub Tab, but not as a Primary Tab.

0
1

try this..

if (typeof(srcSelf) == 'function'){
    srcUp("/003/e?RecordType=012F0000001EvIo&accid={!Account.Id}&ent=Contact&retURL=/{!Account.Id}","_blank"); 
 }else{
    if(sforce.console.isInConsole()){
        sforce.console.openPrimaryTab(null,'/003/e?RecordType=012F0000001EvIo&accid=' + '{!Account.Id}' + '&ent=Contact&retURL=/' + '{!Account.Id}', true);
    }
}

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.