5

We are using Service Console with multiple case recordtypes, profiles, and roles. Within a page layout we are using the 'Custom Console Components' and linking to a simple visualforce page that will display some help text in the left sidebar within subtab components. Here is the simple visualforce page:

<apex:page standardController="Case" showHeader="false" sidebar="false">
 <apex:pageBlock rendered="{!OR(CONTAINS($Profile.Name,'XYZ'), CONTAINS($Profile.Name,'123')))}">
     <dl>
          <dt> Some help text here </dt>
              <dd> Topic 1 </dd>

          <dt> Some help text here </dt>
              <dd> Topic 2 </dd>

     </dl>
  </apex:pageBlock>

So we can render different blocks based on someones profile pretty easily, that all works fine. What we want to do is show or hide different help text based on Case Recordtype. For instance the page layouts are the same but the help text references specific picklist values and when to use them. The picklist values are different based on Case Recordtype. The page layout in question is a standard case page layout that shows after you click on create new case in Service Console and then select your desired recordtype. Nothing is custom.

Is there an easy way to access the case recordtype similar to the Profile in the example above so we can easily segment the portions of visualforce page to show?

1

I don't have console handy...

You should be able to do it with {!Case.RecordType.Name} or ...DeveloperName (which will be more reliable if you've translated the record types to French for example).

That's assuming the Case's Id is nicely passed to that page and info about "this" Case is being shown. If it's not - you might check what's in {!$CurrentPage.parameters} or {!$CurrentPage.url}

1

I am trying a similar thing, to display related Contact / Account and/or other data related to the Case in the Case subTab sidebar (by customizing the associated Case page layout Custom Console Component). Using eyescream's suggestion, I captured the {!CurrentPage} parameters in my controller extension and displayed them in my component.

There are actually two issues I'm running into:

1) When I'm creating a new Case from a Contact record in the console, the sidebar component is displayed, but there are no useful ids in the parameters:

[true, vw, 6a024da22481c84cca3faee6fca5214abbef342d4a50e4eab97271ce551767b9, SalesforceInstanceURL]

I realize that the Case hasn't been saved yet, so there's no Case.Id, but neither is the Contact.Id passed through. Shouldn't the subtab controller at least know the id from whence it came?

2) Assuming that I can get past issue #1, I then run into the following: If I view or edit an existing Case of the same recordtype^, using the same Case page layout, the sidebar component is not displayed at all; the Case opens full-screen/width. Why the change?

  • For those (such as myself) who don't know those parameters intuitively, they are: inContextPane=true, isdtp=vw, nonce=6a024da22481c84cca3faee6fca5214abbef342d4a50e4eab97271ce551767b9, sfdcIFrameOrigin=SalesforceInstanceURL – Duncan Stewart Dec 18 '14 at 20:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.