+ Start a Discussion
JamesHoldcroftJamesHoldcroft 

CTI Adapter SoftPhone button to create New Case

I'm working on a CTI adapter.  I'm having some difficulty creating custom buttons on the SoftPhone that work when in Service Cloud Console.

I've read Gautam's very useful blog at http://success.salesforce.com/ideaView?id=08730000000YKxYAAW, and for testing purposes I'm trying simply to get a custom button on the Softphone to create a new case.  I have the URL of my button set (without the pretty spacing) to:

    javascript:
    if (typeof(srcUp) == 'function')
    {
        alert('in console');
        srcUp('/500/e?isdtp=vw');
        alert('done');
    }
    else
    {
        alert('not in console');
        parent.frames.location.replace('/500/e');
    }

It almost works:

  • When not in the Service Cloud Console, it works fine.  I get the "not in console" alert, and the new case panel comes up.
  • When in the Service Cloud Console starting with viewing a list of cases, it doesn't work.  I get both the "in console" and "done" alerts, but nothing else.
  • When in the Service Cloud Console starting with already viewing some other detail, it works in a strange way.  I get both the "in console" and "done" alerts, and the new case panel comes up in a tab alongside the details that I was already viewing.


What I want is for the button to have the same effect as if I had clicked the "New Case" button from the list of cases view.

I expect there's a simple answer to what I'm doing wrong, but I'm stuck for the moment.  Can anybody help, please?

Thanks,

James.

JamesHoldcroftJamesHoldcroft

Perhaps I've solved my own problem now.  I spotted that the standard CTI adapter SoftPhone link "My calls today" uses popToUrl and seems to work OK whether or not in the Service Cloud Console.  So, now I find that the following works for what I want:

    javascript:
    popToUrl('/500/e',false)

That seems rather simple!  Is popToUrl documented anywhere?

MrBungleMrBungle

The link to blog referenced, http://success.salesforce.com/ideaView?id=08730000000YKxYAAW, is broken. It looks like it has the answer to my questions. Does anyone know it there is an updated link? Thank you.

JamesHoldcroftJamesHoldcroft

The blog I'm referring to is one of the ones listed near the bottom of http://wiki.developerforce.com/page/DevelopingWithServiceAndSupport:

  • The Service Cloud Console – Working with Buttons and Links

Most of the other blog links seem to be broken too.  I can't find the blog anywhere now.