Service Console – How to open the detail page by clicking on hyperlink(formula field) in Sub-Tab

by Sudipta Deb | Feb 12, 2016 | console, formula, service cloud, sub-tab, tab | 2 comments

This post will explain how to open the detail page in a sub-tab after clicking on the hyperlink.
Recently I faced one problem where I need to open the details page of a record in sub-tab inside Service Console by clicking on the hyperlink.
Normally if you have any lookup field in service console layout, the field will appear as hyperlink and clicking on the link will open the detail record in sub-tab.
But in my case, I need to make a custom formula field with return type as Hyperlink. Making a formula field as hyperlink is very easy and if you add the field in the page layout, that field will appear as hyperlink. But the problem comes when you click on the link. Clicking on the link will open the page in another browser tab, which is a little odd. User may feel that they are thrown out of the service cloud console by clicking on a record.
So to improve this user experience, we need to open the detail page in the sub-tab of service console. Below is the formula field which display “Product Name” in the page layout as hyperlink and clicking on that link will open the product detail page in sub-tab by passing the product id.

HYPERLINK(“javascript:
if(typeof(srcUp)==’function’) {
srcUp(‘/” & Product2.Id & “?isdtp=vw’);
}”+ ” else {
window.location.href=’/” & Id & “?isdtp=vw’
}”,
Product2.My_Product_Name__c, “_self”)

Sharing the information here so that it can help others. Please let me know if you have any better approach to achieve the same.

Written by

Related Posts

Commonly Used Salesforce Formulas – Good To Know

Commonly Used Salesforce Formulas – Good To Know

Salesforce Formulas are a powerful tool within the Salesforce platform, designed to enhance the functionality and interactivity of your Salesforce applications. These formulas allow users to perform calculations, manipulate text, and automate processes, thereby transforming data into actionable insights. They are akin to the formulas used in spreadsheet applications but tailored for Salesforce’s robust CRM environment. By utilizing Salesforce Formulas, administrators and developers can create dynamic fields, validation rules, and workflows that respond intelligently to user input and data changes. This capability not only streamlines operations but also ensures data integrity and enhances the user experience. Whether you are calculating sales commissions, formatting dates, or validating data entries, Salesforce Formulas offer a versatile and indispensable resource for maximizing the efficiency and effectiveness of your Salesforce instance.

In this blog post, I will share some of the most commonly used formulas. I will try to keep this blog post up to date by posting new formulas as I experience it in future.

read more...

2 Comments

  1. Dushyant

    Really a good solution for opening formula fields hyperlink in subtabs in service console . Thanks for sharing your findings . Much Appreciated :)

    Reply

Leave a Reply