we had an application up and running, where we had called Salesforce Console Integration Toolkit functions like sforce.console.getEnclosingPrimaryTabId and within that force.console.OpenSubtab(...) was called.

This application was working fine before enabling Locker Service. After enabling this application is throwing "sforce: undefined" error in developer console log and while running Lightning lint on the code base it is throwing "warning: no-undef 'sforce' is not defined" and no subtabs are opening.

I have applied the workaround provided in the blog: Salesforce lightning CLI error no-undef 'sforce' is not defined

This has removed the warning , but the Opensubtab is not working.

  • It appears to be a cross domain issue similar to (salesforce.stackexchange.com/questions/174170/…. We are trying to get rid-off cross domain issue using Windows.postMessage. I'll confirm back in case we able to solve the problem.
    – sIQh
    Commented May 22, 2017 at 9:49
  • This appears to be a known bug to Salesforce : known issue
    – sIQh
    Commented Jun 1, 2017 at 8:19


You must log in to answer this question.

Browse other questions tagged .