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
SFDC Forum 9SFDC Forum 9 

openPrimarytab()

Hi I have vfpage in salesforce console in classic.

Based on given input, it opens contact  custom detailed page using (sforce.openPrimaryTab ).


Same vf page i have placed in lighting app and trying to call it, but it does not go anywhere.

Please help me any alternative for this.

NOTE:: I want to use same vf page and make it compatible to lightning, dont want to create lightning component for this.
Best Answer chosen by SFDC Forum 9
SFDC Forum 9SFDC Forum 9
Hi All, it has been resolved post changing javascript API version in vf code.I have changed from 24 to 47.:-)

All Answers

SwethaSwetha (Salesforce Developers) 
HI,
Can you share if you are seeing any error in the browser console logs in case of lightning?

Please see related article for same issue and try the approach mentioned there
https://salesforce.stackexchange.com/questions/138466/openprimarytab-function-does-not-work

https://salesforce.stackexchange.com/questions/217627/salesforce-lightning-standard-navigation-openprimarytab-not-working
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
 
Thank you
SFDC Forum 9SFDC Forum 9
User-added image
Please find here.






 
SwethaSwetha (Salesforce Developers) 
The error "DOMException: Blocked a frame with origin '  ' accessing a cross-origin frame visualforce page" occurs for multiple reasons.

Can you share what are the parameters passed to sforce.console.openPrimaryTab method

Thanks
SFDC Forum 9SFDC Forum 9
Hi Swetha, 

Are you from salesforce team by any chance.If so, can you connect through zoom\web ex quickly.So that I can show you wats gng on there.

Thanks
SFDC Forum 9SFDC Forum 9
Hey Swetha,

Are you from salesforce team, if yes, can you connect thorugh zoom or something, so that i can show whats happening here.


thanks!
SFDC Forum 9SFDC Forum 9

Hey Swetha,

Are you from salesforce team, if yes, can you connect thorugh zoom or something, so that i can show whats happening here.

thanks!

 
SFDC Forum 9SFDC Forum 9
Hi All, it has been resolved post changing javascript API version in vf code.I have changed from 24 to 47.:-)
This was selected as the best answer