• Rajesh Admin 9
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I am trying to implement the service console and am stuck on a button issue.

 

Currently  I have a custom "New Case" button that displays within a contact.  It uses javascript to auto-pop some fields based on user settings

Ex:

window.parent.location.href ="%2F500%2Fe?00N800000034wTE={!$User.Language_Support__c}&cas3_lkid={!Contact.Id}&00N80000003MDbe={!$User.Default_Country_cases__c}&retURL=%2F500%2Fo";

 

In testing within the console, this will load the case creation form outside the console.  To get around this, I am using the following code (some hard coding in place right now to eliminate variables):

 

{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")} 
if (typeof(srcUp) == 'function') 
{
} else {    
     window.parent.location.href ="%2F500%2Fe?00N800000034wTE={!$User.Language_Support__c}&cas3_lkid={!Contact.Id}&00N80000003MDbe={!$User.Default_Country_cases__c}&retURL=%2F500%2Fo";
}
Now the behavior is working in console (as well as if not in console), however I believe that because the button originates from a "Contact" page, that somehow the controller class is not changing to a case controller.  Even though the main page is laid out correctly, I am not getting the Knowledge or other side bars that should be there (getting contact one still).
Any suggestions on how to fix this, or a more elegant way of doing this would be appreciated.  The built in "New Case" works fine, but I need to pass some $user parameters into case fields during submission, all while remaining within console.