I have an Action button in the layout of the Account sObject, the action button is a Lightning component, when opening the account in the Cloud Console and that action is submitted I try to navigate to a VF page with the following code

    var urlEvent = $A.get('e.force:navigateToURL');
    urlEvent.setParams({ url: '/apex/myVFPage' });

This works fine outside the Cloud Console but fails when in the Cloud Console, I didn't find a way to access the method sforce.console.openPrimaryTab or sfone at all in my Lightning component, so how can I navigate in the Cloud Console from Lightning?


I'm including the toolkit:

<ltng:require scripts="/support/console/39.0/integration.js" />

But methods there don't work properly sforce.console.isInConsole returns false, and sforce.console.openConsoleUrl throws an error.


The 'throws an error' detail would help narrow down the issue, but there is at least one known issue with that library. Posting this for others who come across this question:


| improve this answer | |
  • P.S: For my actual "detail" I should add the following (using integration.js (v39.0)): Calling sforce.console.openPrimaryTab from a lightning component results in: This page has an error. You might just need to refresh it. Action failed: c:MyContactList$controller$openTab [Unable to get property 'registerFunction' of undefined or null reference] Failing descriptor: {c:MyContactList$controller$openTab} – D Brown May 19 '17 at 19:03
  • You should edit your answer to include both that detail, as well as the notable text of the known issue- such as the scheduled fix date. – battery.cord May 19 '17 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.