Gravatar for jpdery@coveo.com

Question by jpdery, May 22, 2014 8:31 PM

Salesforce Case Insight Panel expressions fail in normal, non-edit mode

$correlateUsingIdf(keywords: "{!>Subject}")

The above expression, in -edit- mode of a Case Insight Panel produces this, as expected:

$correlateUsingIdf(keywords: "this is my subject")

However, when saved and viewed in -normal- mode, it produces this:

$correlateUsingIdf(keywords: "")

This is also repeatable with another field, custom.

I get confused however because this expression:

@sfid=={!id}

correctly produces

@sfid=="500e0000002fFxTAAU"

in -both- modes.

Note: my InsightPanel apex page is custom, modified according to https://answers.coveo.com/questions/67/how-to-configure-salesforce-coveoattachtocase

1 Reply
Gravatar for mlaporte@coveo.com

Answer by Martin Laporte, May 23, 2014 5:23 AM

Ah that is a tricky behavior of Salesforce: objects loaded by a standard controller for a page (Case here) only populate the fields that are directly referenced in the VisualForce page. So when using a custom VF page for a panel, you need to put some dummy code in the page like this for each field you'll reference in your query:

< apex:outputText value="{!Subject}" rendered="false"/> 

The stock page uses the CoveoPageExtension controller that automatically loads all fields through a tricky process. But you can't access this class in a custom page at the moment.

Gravatar for jpdery@coveo.com

Comment by jpdery, May 23, 2014 9:48 AM

Had to actually say: < apex:outputText value="{!case.Subject}" rendered="false"/>

Ask a question