4 votes

window.postMessage does not work in lightning console app. Any workaround?

This is an expected behaviour since postMessage with targetOrigin '*' sends the message with no target preference and your tabs are in the same lightning container. The window.postMessage() method ...
tugce's user avatar
  • 2,541
3 votes
Accepted

OpenPrimaryTab fails with salesforce.com URL

www.salesforce.com has the header X-Frame-Options: SAMEORIGIN. An origin is defined as the specific subdomain that exactly matches the origin. So, for example, in your sandbox, your origin is cs14....
sfdcfox's user avatar
  • 477k
3 votes

Understanding opensubtab functionality along with javascript

The sforce.console.getEnclosingTabId method is asynchronous and the method you pass in as a parameter is termed a callback function. This behavior is clearly indicated in the documentation: This ...
Adrian Larson's user avatar
  • 149k
3 votes
Accepted

Is there a unique session ID for a primary tab in Service Console?

The tab IDs are unique within a console, but not guaranteed to be the same if you close and reopen a tab or if you leave and re-enter the console. So you may have primary 'scc-pt-0' with a subtab '...
Paul H.'s user avatar
  • 1,328
2 votes
Accepted

openPrimaryTab function does not work

Did you change your signature of openPrimaryTab to take parameters and verify that {!URLFOR($Action.Account.View, Case.Account.Id )} evaluates to a legal URL? The following code works successfully ...
Paul H.'s user avatar
  • 1,328
2 votes

Problem Hiding Sidebar using JavaScript

I found the following reference in Launching a Visual Force Page in the Service Cloud Console (my emphasis): IMPORTANT: Be careful if your uses a visualforce inside another vf, for example using . ...
Daniel Ballinger's user avatar
2 votes
Accepted

isInConsole() Showing False in embedded VF Page

If you are opening the standard record from listview in console then page will be in console. It works perfectly based on your code. Issue is: Your development mode is opened. Close the ...
Santanu Boral's user avatar
2 votes

Can Lightning WorkspaceAPI be used to Open tabs in Visualforce Pages?

One approach you can take is to create a lightning component, embed the VF Page in an iframe inside the lightning component. From the VF page, you can use parent.postMessage to send messages to the ...
Aditya Topalli's user avatar
2 votes

Get Object Id of the currently open primary tab on a custom console component through apex controller

It sounds like what you're getting is the ID of the tab when what you really want is the ID of the object. For this you can use sforce.console.getFocusedPrimaryTabObjectId instead of sforce.console....
Albert James's user avatar
1 vote

How to open console tab from within a visualforce on a page layout?

You're right about the console integration methods not working because they're being called from inside an iFrame. Is there any reason the button needs to be in a visualforce page embedded in the ...
Shane Steinfeld's user avatar
1 vote

how to write lightning Component for JavaScript Button which contains sforce.Console.openSubtab() functionality?

There is a Lightning Console JavaScript API for Lightning Experience in Pilot right now, I think it will be the way to go once it's GA.
Fabien Taillon's user avatar
1 vote
Accepted

Custom Javascript Button Issue (Not throwing error)

If you use javascript button, throw the error using alert like this: alert ('There is no Activity record associated with this Fax. Please contact your System Administrator'); It should stay on the ...
Santanu Boral's user avatar
1 vote
Accepted

Close Tab automatically in Service Cloud Console

I used a workaround suggested in SFDC Developer Forum by Ron Wild.
Json's user avatar
  • 1,597
1 vote
Accepted

sforce.console.isInConsole() not working (returns false even in Console)

To recognize whether the page is in console or classic view (non-console) change the formula field like this: Formula field to open visualforce in console HYPERLINK("javascript:if(typeof(srcUp)=='...
Santanu Boral's user avatar
1 vote
Accepted

Salesforce - Console Integration Toolkit : openSubTab: Invalid ID: scc-st-0

What your screenshot shows is indeed a primary tab 'Mario Rossi'. But what you don't see is that there is actually a 'Details' subtab contained within that primary tab. Were you to open additional ...
Paul H.'s user avatar
  • 1,328
1 vote

Console method to get selected tab on VF page

You want getFocusedSubtabObjectId. sforce.console.getFocusedSubtabObjectId(new function (result) { console.log(resul.objectId); } On a side note, why reinvent the wheel? Just grab the caseId ...
Adrian Larson's user avatar
  • 149k
1 vote
Accepted

Service cloud console auto close Primary Tab after 5 sec

Posting comment as answer Provide a callback function and use setTimeout(function(){ alert("Hello"); }, 5000); Obviously replacing the alert with the code you need?
Eric's user avatar
  • 53.9k
1 vote

Salesforce Console event not sent successfully when reloading page

The events that are fired in the console are asynchronous events, similar to callouts to other web services. When you do something that refreshes the page (such as setting location=...) this triggers ...
abd3721's user avatar
  • 2,132

Only top scored, non community-wiki answers of a minimum length are eligible