SalesforceResultLink component

In this article

When viewing Salesforce items from the search results inside the Salesforce Classic console, it’s ideal for them to open in Salesforce console tabs, or in a Lightning community for them to open directly in the community. To achieve the desired behavior, this component inherits directly from the ResultLink component with a couple of extra options and default settings.

  • When using the ResultLink component, Salesforce items might open in a new browser tab instead of in the console. They might also try to open through the internal console link, instead of the customer-facing community link, while in a Salesforce Community.

  • For a Lightning console version, see ConsoleResultLink component.

Options

openInPrimaryTab

Specifies that the result link should try to open as a primary console tab. If it fails, it opens in a new browser tab instead.

The default value is true.

Most of the time, a result link fails to open if the URL isn’t allowlisted for your console app. You can see an explicit message in the browser console that tells you that the URL was denied (see Whitelist Domains for a Salesforce Console).

<a class='CoveoSalesforceResultLink' data-open-in-primary-tab='true'/>

openInSubTab

Specifies that the result link should try to open as a secondary console tab. If it fails, it opens in a new browser tab instead.

The default value is false.

Most of the time, a result link fails to open if the URL isn’t allowlisted for your console app. You can see an explicit message in the browser console that tells you that the URL was denied (see Whitelist Domains for a Salesforce Console).

<a class='CoveoSalesforceResultLink' data-open-in-sub-tab='false'/>

Methods

This component doesn’t provide any methods.

Usage

This component is meant to be used in result templates.

<a class='CoveoSalesforceResultLink'></a>

Force All Items to Open in a New Browser Tab

If you want to force all items to open in a new browser tab outside of the Salesforce console, then you can set the options openInPrimaryTab and openInSubTab to false. You can then use the standard ResultLink component options.