function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suma GangaSuma Ganga 

Salesforce Console

Hi Experts,
I have small problem in console.
Problem:: I am opening a case record as Primary Tab from the console with pre-populated values like contact name and related to by clicking the Button in the page. (Populating values thru URL hacking). It is done without any issue.
But, I have the problem here, I have to pass the page link where the button is clicked (is nothing but I have to capture the link from which page I am opening the case record.)
So, I am passing the link in the URL itself. The primary tab link looks like https://xxx.salesforce.com/console#https%3A%2F%xxx%2F00Qg0000004RZ6T|https%3A%2F%xxx%2F00Qg0000004RZ6T
And the final URL im using to open a case (with pre-populated values) is :: “/500/e?retURL=500&RecordType=012g00000000dcVAAQ&ent=Case&cas11=SFDC&cas3_lkid=003g000000NxzFEAAZ&00Ng0000001H7IO=https://xxx/console%23https%3A%2F%2Fxxx%2F00Qg0000004RZ6T|https%3A%2F%2Fxxx%2F00Qg0000004RZ6T”
But, my new tab is not opening and it is giving me error like “xxx is not authorized domain. Please contact your administrator to authorize it.”
If I replace the link https:// with www , tab is opening without issue.- in the detail page i cant open the page by clicking the link with www...... 

please help..

Thanks in advance ..
Suma.
 
 
Amit Chaudhary 8Amit Chaudhary 8
Please check below blog for more information:-
http://amitsalesforce.blogspot.in/search/label/Console

For primary tab you can try below post
http://amitsalesforce.blogspot.in/2015/03/how-to-open-new-record-inside-console.html

Include JS in VF page
<apex:includeScript value="/support/console/26.0/integration.js"/>
Write below Java Script code in VF page
<script>

function openTab(id, name) 
{
 if (sforce.console.isInConsole())
  sforce.console.openPrimaryTab(undefined, '/' + id + '?isdtp=vw', true, name);
 else
  window.top.location.href = '/' + id;
}

</script>

Then use below link to open new record .
 
<a href="#" onclick="openTab('{!Obj.id}''{!Obj.name}'); return false;">{!Obj.customKey}</a>

I hope that will help you.

Thanks
Amit Chaudhary