We had an issue where


returned false in the Customer Console. Of course, if we are in the Console it should return true. Upon further inspection, it appears that the sforce.console.isInConsole function checks for a few things, including an isdtp URL parameter.

isInConsole: function() {
        var qs = location.search;

        return !(typeof sforce != "undefined" && sforce.one) &&
                (qs.length !== 0 && ((qs.indexOf("?isdtp=") > -1)
                || (qs.indexOf("&isdtp=") > -1)))
                || canvasClient.isInConsole();

In our case, the isdtp URL parameter was missing. So isInConsole returned false. Does anybody have an idea why that might be happening? Or what to to do to fix it?

  • isdtp is normally appended automatically when navigating inside of the console so it's a bit surprising it's absent. What kind of tab were you viewing and how do you open it (standard links, custom buttons, apex redirect, toolkit, etc...) when this happens? – Paul H. Sep 14 '16 at 21:49
  • It's a VisualForce page that replaces the standard "Account View" page. So whenever we click on an Account link (usually from within a List View), the VF page is displayed in the center of the console as a primary tab. I do include the integration Javascript file in that VF page. If we open an Account from other places, we use the sforce.console.openPrimaryTab() function as far as I'm aware, and the VF page opens properly. I have not yet found in which exact situations the isdtp variable is missing. But you're saying it should always be there, usually? – Willem Mulder Sep 15 '16 at 7:40
  • If you're just replacing the View action of accounts with a VF page I'd expect it to be there. There might be some situations where it's not added that I'm not thinking of, but for such a standard functionality it should be there. I tested on my own org and I see it added. I'm not sure what to suggest :( – Paul H. Sep 15 '16 at 18:14
  • Thanks for looking into this anyways! I think we'll have to wait until somebody has the same issue and finds a fix/workaround. – Willem Mulder Sep 26 '16 at 19:11
  • This problem is occurring due to related list condition i think you are using true false condition in related list so once remove the true false condition then check it'll return true. – Kuhinoor Alam Aug 16 '17 at 17:00

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.