Integrating Coveo Lightning Console Components
- Using Coveo for Salesforce in the Lightning App Builder
- Customizing the Standalone Searchbox
- Changing the Result Icons in a Lightning Component
- Changing the Language of Your Search Interface in Lightning
- Generating a Custom Search Token for Lightning Components
- Making the Coveo Lightning Components Lightning Locker Compliant
- Generating a Custom Search Token for Lightning Components Using Lightning Locker
Making the Coveo Lightning Components Lightning Locker Compliant
As of the May 2017 release of Coveo for Salesforce (2.41), the Coveo Lightning components can be Lightning Locker compliant (see Coveo for Salesforce Overview).
While all components and pages created from Coveo for Salesforce 2.41 and later are already Lightning Locker compliant out of the box, components and pages created earlier must be changed to become compliant.
You are not encouraged to activate Lightning Locker with Coveo for Salesforce 2.41, as it may affect your integration in unexpected ways.
While you can experiment with Lightning Locker activated, it is not recommended to go in production with it.
While activating Lightning Locker with Coveo for Salesforce 2.41+ might not seem to affect your search page at first, it is a good idea to nevertheless perform the changes. Not doing so may prevent your search page from working in the future.
Remember to perform the modifications for all of the Coveo Lightning components in your community.
Previous versions of the Coveo Search page used
data-condition to ensure that the right templates are loaded for the right type of document (see TemplateLoader - condition).
You must replace every
One of your result template uses the following
<script id="SalesforceAccount" class="result-template" type='text/html' data-condition="raw.objecttype == 'Account'" >
You change the
data-condition="raw.objecttype == 'Account'" to its
<script id="SalesforceAccount" class="result-template" type='text/html' data-field-objecttype="Account" >
Use Static Resources for Your Customization
Before Lightning Locker, the good practice to include custom code was to add it to a custom Lightning component that wraps the Coveo components.
Once you have performed these steps, your Coveo for Salesforce integration should be Lightning Locker compliant.