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 Answer 1

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);
    }
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .