Advanced examples of Alfresco search queries (informed by Salesforce field values) - Advanced examples of Alfresco search queries (informed by Salesforce field values) - Alfresco - Alfresco Content Connector for Salesforce - Alfresco/Alfresco-Content-Connector-for-Salesforce/2.4/Alfresco-Content-Connector-for-Salesforce/Alfresco-Content-Connector-for-Salesforce/Using/Surfacing-recommended-content/Configuration-and-setup-Sales-Admin/Advanced-examples-of-Alfresco-search-queries-informed-by-Salesforce-field-values - 2.4

Alfresco Content Connector for Salesforce

Platform
Alfresco
Product
Alfresco Content Connector for Salesforce
Release
2.4
ft:lastPublication
2026-05-06T14:48:53.777000
ft:locale
en-US
ArchiveStatus
Archived

The Alfresco Search Query can reference properties from the Salesforce object using the standard Salesforce notation of {!<Object>.<property>}. For example {!Opportunity.Name} would display the name of the Opportunity record where the Visualforce page is being displayed.

You can use complicated business logic, or reference object properties that don't have a child relationship to the object, through additional Apex code referenced in the extensions attribute of the apex:page tag.

If a property could have characters that may break the structure of a JSON file they should be wrapped in a Salesforce JSENCODE formula function i.e. {!JSENCODE(Opportunity.Name)}.

Example with Salesforce object field pickvalue (single-valued and mandatory):

{[
  {"id":1,"name":"My 1","query":"=myprefix:myprop1:{!Opportunity.LeadSource}"}
]}

Example with Salesforce object field pickvalue (single-valued and optional):

{[
  {"id":1,"name":"My 1","query":"{!IF(ISBLANK(Opportunity.LeadSource),(''),('AND =my:prop:'+Opportunity.LeadSource))}"}
]}

Note

In this example, the extra property match is not applied if the field is not set.