Sales/Service Console

  • 1
  • Question
  • Updated 5 years ago
I have a squid page (account details page) that I would like to use within a Sales/Service console....I followed the instructions within the Service Cloud tutorial....its loading within the console.....but I have a few items not working:

1) The Tab reads at the top of the console reads External Page instead of the Account Name....

2) I have custom hyper links (created using a Template component) within my skuid page (see below)....when I click on the link...the SF record is opened in a new window outside of the console....I would like for the record to open within the console.....

<a href="/{{{relatedParentrI}}}" target="_blank">{{{relatedParentrN}}}</a>

Thank you any advice....
Photo of rocketc

rocketc

  • 722 Points 500 badge 2x thumb

Posted 5 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
1. This is a tricky problem to avoid --- does the Visualforce Page you are using as the Account View override have a "title" property set? Make sure the VF Page has something like

 <apex:page standardController="Account" title="{!Account.Name}" ... >

2. Try using this link instead. This uses the skuid.utils.redirect() API method, which does different things based on your Salesforce environment, e.g. if you are in regular Salesforce it does a URL Redirect, whereas if you are in a Console, it tries to open a new Console tab (but checks first to see whether the given URL is already open, and if it is, it just refreshes it), and if you are in Salesforce1, it uses Salesforce1 navigation methods.

<a href="javascript:skuid.utils.redirect({url:'/{{{Id}}}',title:'{{Name}}',window:"blank"})">{{{Name}}}</a>
Photo of rocketc

rocketc

  • 722 Points 500 badge 2x thumb
Zach,

Thank you for the follow-up. 

I tried adding the Account title code as suggested above....got an error...Title already specified...**full disclosure*** my object is actually a custom object Member_c...not sure if this works differently for a custom object....below is my code 

I created the VF page by coping the code directly from the Service Console tutorial.

<apex:page standardController="Member_c" recordsetvar="a" extensions="skuid.Redirects"showHeader="true" sidebar="false" standardStylesheets="false" showChat="false"action="{!IF(canUseSkuid,'',redirect)}" title="{!$ObjectType.Member_c.labelPlural}" readonly="true" docType="html-5.0"><skuid:page actiontype="Tab" objecttype="Member_c"/></apex:page>

thank you again for your help
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Ah, here is the confusion --- this VF Page for the Member__c Tab action override looks good, but have you overriden the Member__c object's View action as well? If you haven't then you should be fine, but if you have overriden the Member__c object's View action, then that is the page where you will need to do what I said above. For instance here might be the code for your Member__c Object's View action override VF Page:

<apex:page standardController="Member_c" extensions="skuid.Redirects" showHeader="true" sidebar="false" standardStylesheets="false" showChat="false"action="{!IF(canUseSkuid,'',redirect)}" title="{!Member__c.Name}" readonly="true" docType="html-5.0">
<skuid:page actiontype="View" objecttype="Member_c"/>
</apex:page>
(Edited)
Photo of rocketc

rocketc

  • 722 Points 500 badge 2x thumb
Zach,

I'm not able to get the hyper link to work....

Originally I used the following code....
<a href="/{{{relatedParentrI}}}" target="_blank">{{{relatedParentrN}}}</a>


<a href="javascript:skuid.utils.redirect({url:'/{{{Id}}}',title:'{{Name}}',window:"blank"})">{{{Name}}}</a>

Based on your suggestion above.....my new code looks like this:
<a href="javascript:skuid.utils.redirect({url:'/{{{relatedParentrI}}}',title:'{{relatedParentrN}}',window:"blank"})">{{{relatedParentrN}}}</a>

I get the following results for my hyper link.....

ParentName,"window:"blank"})">Parent

Any suggestions? Thank you again for your help...

PS: The link is used for records within an Aggregated view....not sure if this matters.....the link works great outside a Console app....I'm seeking to have the links open within the console.

Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
The problem is in your use of double quotes within double quotes --- you need to use all single quotes when you are already inside of double quotes. So where you have window:"blank" this should be window:'blank', notice the single quotes rather than double quotes.
Photo of rocketc

rocketc

  • 722 Points 500 badge 2x thumb
Zach,

Thank you for the quick follow-up.

I changed to the single quotes....but not nothing is displaying.

 <a href="javascript:skuid.utils.redirect({url:'/{{{relatedParentrI}}}',title:'{{relatedParentrN}}',window:'blank'})">{{{relatedParentrN}}}</a>
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Also try doing triple braces around relatedParentrN in title:

 <a href="javascript:skuid.utils.redirect({url:'/{{{relatedParentrI}}}',title:'{{{relatedParentrN}}}',window:'blank'})">{{{relatedParentrN}}}</a>
Photo of rocketc

rocketc

  • 722 Points 500 badge 2x thumb
Zach, I got the link working...Thank you!

However, I'm still having trouble with getting the [Member Name] to appear on a console tab....it still reads "External"....

I have created a VP page using the code below....I then have this page override the Member_c objects View action.....

Note: I have created a Skuid Page Assignment record for the Member_c object and the view action calling the Skuid Member Detail page. 

Thank you again.

<apex:page standardController="Member__c" extensions="skuid.Redirects" 
        showHeader="true" sidebar="false" standardStylesheets="false" showChat="false"
        action="{!IF(canUseSkuid,'',redirect)}" title="{!Member__c.Name}"
        readonly="true" docType="html-5.0">
    <skuid:page actiontype="View" objecttype="Member__c"/>
</apex:page>