--- title: Change the default Quick view in Coveo for Salesforce slug: '1234' canonical_url: https://docs.coveo.com/en/1234/ collection: coveo-for-salesforce source_format: adoc --- # Change the default Quick view in Coveo for Salesforce In your result templates, you can choose to show a [quickview](https://docs.coveo.com/en/3311/) control, allowing users to see a preview of a result without leaving the search page. By default, the [**Quickview**](https://coveo.github.io/search-ui/components/quickview.html) uses the item `body` field in the index to display the preview. You will oftentimes want to adapt the default Quickview to fit your needs. There are two ways to do so: * Building a custom **body** for your items in the index (see [Add or edit a body mapping](https://docs.coveo.com/en/1847/)). > **Important** > > This method is only available with Coveo for Salesforce Pro and Enterprise. * Specifying a **Quickview** template to control how to display the preview (see [Coveo Quickview Component (CoveoQuickview)](https://coveo.github.io/search-ui/components/quickview.html)). Each method presents their own advantages:
Changing the indexed Quick view Specifying a Quick view template
  • Index-Side
  • Only available with Coveo for Salesforce Pro and Enterprise
  • Configured in the Coveo Administration Console
  • Client-Side
  • Available with all editions of Coveo for Salesforce
  • Configured in HTML directly on your search page
## Changing the indexed Quick view [.version.c4sf.c4sf-edition.c4sf-pro-enterprise] [Pro and Enterprise editions](https://docs.coveo.com/en/l2590456#salesforce) Integrators usually prefer to change the indexed Quick view when they can. To do this, you need to change the `body` field (see [View or Edit a Salesforce object body](https://docs.coveo.com/en/1052#define-a-salesforce-object-body)), which affects both the Quick view and the excerpt. ## Specifying a Quick view template While not the preferred approach for users with Coveo for Salesforce Pro or Enterprise, adding a Quick view template is the ideal solution to add Quick views if you have a particular use case. To add a Quick view template, you need to add it in the code of your page. . [Access the Coveo for Salesforce Interface Editor](https://docs.coveo.com/en/3081/). . At the top of the page, select the **Code View** tab. . At the end of your result template list, add a template that you will use as your Quick view. An example template for an account could look like this: ```xml ``` > **Note** > > For more information on how to build result templates, see [Configure JavaScript search result templates](https://docs.coveo.com/en/1767/). . Select **UI View** at the top of the page. . Edit the result template of one of your results that should use the Quick view you just added. Hover over it and click **Edit** that appears in its upper-right corner. . Click **Layout**. . Drag the **Quick View** component where you want to put it on your page. . In the **Quickview Options** window, ensure that the **Always show** checkbox is checked. . Select **Save**. . Select the **Code View** tab again. . Search for your newly added `Quickview` component. It should look like this: ```xml ``` > **Important** > > The `CoveoQuickview` component isn't compliant with Lightning Locker. > Therefore, in Coveo for Salesforce v3.16 and up (Lightning Experience), use the [`CoveoSalesforceQuickview`](https://docs.coveo.com/en/20#salesforcequickview-component) component instead. . Add a reference to the template id that the Quick view should use. According to our previous example, your `CoveoQuickview` component would now look like this: ```xml ``` . Repeat these steps for all the objects on which you want to add Quick views.