You need to sign in to do that
Don't have an account?
JayaJaya
Urgent Please: How to open a subtab in Service Console on button click?
Hi,
In Service Console, I have created a custom button in lead detail page. On click of that button, I need to open a Service Console subtab(passing the lead Id). Please let me know how to achieve this. I dont know much about Service Cloud.
Its very urgent, so a immediate response is very very helpful to me. Thanks a lot.
--Jaya.
srcUp('UrlOfTheNewTabGoesHere');
This approach is not documented. It just uses the existing mechanism that the standard links on the detail page use to open windows as subtabs.
Let me know if you need more help on this.
All Answers
srcUp('UrlOfTheNewTabGoesHere');
This approach is not documented. It just uses the existing mechanism that the standard links on the detail page use to open windows as subtabs.
Let me know if you need more help on this.
Thanks Jerun for your response.
Hi
Could you please help me set the tab label using scrup?
Its Urgent !!
Thanks in advance
Regards
Palak
I dont think the srcUp function defines the tab name. The tab name is from the page that is being opened in the subtab
Hi Jaya
you will be able to set sub tab name just by passing tab name as a parameter to openSubTab() standard method.Here is an example:
function openSubtab(subtabUrl, subTabTitle)
{
// Use the results primary tab id and open a new subtab
var openSubtab = function(result)
{
sforce.console.openSubtab(result.id, subtabUrl, true, subTabTitle, null);
};
sforce.console.getEnclosingPrimaryTabId(openSubtab);
}
result.id - id of primary tab under which subtab is to be opened.
SubTabUrl- url for subtab
true- sets focus on the sub tab opened.
SubTabTitle- This sets your required SubTab Name
null- indicates that new subtab will be opened insted of overriding existing tab.
Happy if it helps.
Thanks
Hi Vikas,
Thanks for your response !!!
Could you please help me in getting the id of primary tab under which subtab is to be opened?
Thanks in advance !!
Regards
Palak Agarwal
See code commentation for the description below.
//This line itself fetchs the primary tab id and calls openSubtab function along with the fetched id. Below alerted value gives you primary tab id.
sforce.console.getEnclosingPrimaryTabId(openSubtab);
// Use the results primary tab id and open a new subtab
var openSubtab = function(result)
{
// This alerted id is itself primary tab id.
alert(result.id);
sforce.console.openSubtab(result.id, subtabUrl, true, subTabTitle, null);
};
for details refer to
http://www.salesforce.com/us/developer/docs/api_console/api_console.pdf
Let me know if your query is resolved.
Thanks
Hi All,
I am trying to implement the same in my project. when clicking on the custom button, i am getting the error like:
"URL doesnot exist."
For subTabURL, how to set the url value.
can anyone please support in this?
Regards,
kumar
I have been doing some research on my issue but have come up empty handed. I am using the srcUp() function on a custom button to open an external page. However, when the subtub opens, nothing loads (see picture below). The domain is whitelisted in the app. Any suggestions is greatly appreciated. Thank you.
I need to open a custom page in new tab inside Console-
Below code is opening the tab in complete new tab i.e ouside console in salesforce
if(sObjName=='Case'){
SObject record = Database.query('Select CaseNumber From ' + sObjName + ' Where Id = :subOrderId');
extractName= record.get('CaseNumber');
c.Re_send_email_Link__c='<a href=' +System.URL.getSalesforceBaseUrl().toExternalForm()+'/'+subOrderId+' >'+extractName+'</a> <br/>';
Please help
Can we do this lightning console app as well? If yes, please provide details.