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
- 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
In Summer ’17, Lightning Locker was auto-activated for all Salesforce organizations with no option to disable, meaning that Lightning Locker is automatically enabled for components using API version 40 onwards.
Since the May 2018 release of Coveo for Salesforce V3.10, Coveo for Salesforce Lightning components have gradually migrated to be compliant with Lightning Locker.
The following table shows the evolution of Lightning Locker compliance of Coveo for Salesforce Lightning components:
|Release package number||Migrated components|
As of the Coveo for Salesforce V4 release, the former Coveo Case Creation, Coveo Search, Coveo Searchbox, and Coveo Base components have been deprecated in favor of newer Lightning Locker compliant components.
To learn how to leverage these new components, see Upgrading from Coveo for Salesforce V3 to V4.
Making Earlier Versions of the Coveo for Salesforce Lightning Components Lightning Locker Compliant
While all components and pages created from Coveo for Salesforce 2.41 onwards are already Lightning Locker compliant out of the box, components and pages created earlier must be updated to become compliant.
You’re 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, we don’t recommended going to production with it.
While activating Lightning Locker with Coveo for Salesforce 2.41+ might not seem to affect your search page at first, it’s a good idea to nevertheless perform the changes listed in this section. Not doing so may prevent your search page from working in the future.
Remember to perform the changes for all of the Coveo Lightning components in your community.
Previous versions of the Coveo-powered 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.