Skip to main content

Posts

Showing posts from November, 2017

Opening Primary or subtab in the console through hyperlink Formula fields (eliminating Javascript hyperlink formula field)

From Spring 17, A URL for the HYPERLINK function can not contain JavaScript. This change was done to increase the security of the salesforce org.   Before this change, When we want to open contact screen as subtab in the console, we could use Javascript Hyperlink Formula field  like HYPERLINK("javascript:if(typeof(srcUp)=='function') {srcUp('/003/e?isdtp=vw&accid=" & Id & "');}"+ " else {window.location.href='/003/e?accid=" & Id & "'}","Create Contact","_self") After Spring 17, To open the same in subtab, we need to implement the solution using visualforce To open Contact screen as primary tab. 1. Create a formaula filed with hyper link function which calls the VF page "OpenContact" and pass the required parameters HYPERLINK("/apex/OpenContact?id="& ContactId & "&caseid="& Id,"Contact Detail",'_self') 2. In the