We have an in-house OpenCTI adapter that we use with salesforce. It's primary responsibility is to find associated records and pop the results when a new call comes in.

We have a tendency to have Salesforce open in a number of tabs at once. We quickly found that screen popping in all of these windows was not what we desired.

To solve this problem, we added an enable/disable checkbox to our OpenCTI screen. This way, a user can designate one window as the window to allow screen pops in.

The problem we're encountering is that this checkbox loses its value every time the user navigates to a new page (or pops). Our initial thought was to save the checkbox state in the browser localStorage, but we need to somehow make sure that the state saved is local to the current browser window so that the saved checkbox state isn't shared between all open windows.

To do this, it seems that we need a way to identify the current window, but this doesn't seem possible with cross-domain browser restrictions. We are also failing to find any sort of unique identifier that is tied to the current browser window and is passed by Salesforce to our IFRAME or through any of the OpenCTI JS library calls.

Is anyone aware of a solution to this problem? Can it be solved somehow in the APEX domain? Is there a better workaround?

  • localstorage would be a good way to go, but it affects all tabs. Did you ever find an answer out to this? – Paul Fischer Mar 23 '15 at 19:45
  • @PaulFischer localStorage can save state for all visibility state changes that was triggered in program - but what about these changes that were cause by just clicking relevant controls in interface? – shabunc Aug 21 '15 at 11:55

Your Answer

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

Browse other questions tagged or ask your own question.