---
title: Salesforce Buttons
slug: reports/salesforce-buttons
description: Add a Salesforce button to run Unaric Reports directly from any record or list view.
docTags: 
createdAt: 2026-02-24T21:12:22.403Z
---

You can add buttons in Salesforce to view, download, or send your Unaric Reports Solution. For example, you could set up a button on Contacts to view open up their list of Open Cases report and perform AI analysis to spot trends and provide recommendations.&#x20;

## Button types

| **Type**     | **What it does**                                   |
| ------------ | -------------------------------------------------- |
| **View**     | Opens the Solution in a new tab                    |
| **Download** | Downloads the file based on Solution configuration |
| **Send**     | Opens email preview and allows sending<br />       |

## Prerequisites

### Install button package

For using buttons in Salesforce Lightning, you will need to install the following package for all users:

:::CtaButton{label="Install for Production" externalHref="https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKg000000PbDf" openInNewTab="true"}

:::

:::CtaButton{label="Install for Sandbox" externalHref="https://test.salesforce.com/packaging/installPackage.apexp?p0=04tKg000000PbDf" openInNewTab="true"}

:::

### Enable profile access

If you are using **Salesforce Lightning**, users must have profile access to the required Apex classes and Visualforce pages included in the Lightning package. Without this access, the button will fail to load or return a permissions' error.

To enable access:

1. On Salesforce, navigate to **Setup > Profiles.**&#x20;
2. Open the profiles that will use the button. Make sure access is granted to all profiles that should be able to run the Solution from Salesforce.
3. Grant access to:&#x20;
   - **Apex Classes**&#x20;
     - `ReportBuilderController`&#x20;
     - `ReportBuilderWebTabController`&#x20;
   - **Visualforce Pages**&#x20;
     - `ReportBuilder`&#x20;
     - `ReportBuilderLink`&#x20;

## Setup

:::::::WorkflowBlock
:::WorkflowBlockItem
### Create the button

1. In Salesforce, navigate to **Setup > Objects and Fields > Object Manager**.
2. Select the object you wish to add the button.
3. Go to the **Buttons, Links, and Layouts&#x20;**&#x74;ab and click the **New Button or Link** button.
:::

::::::WorkflowBlockItem
### Configure the button

Enter the values for button based on how you would like it to work. Set the **Content Source** to *URL* and set this field to the following (replacing variables):

:::::Tabs
::::Tab{title="Salesforce Lightning"}
:::BlockQuote
/apex/ReportBuilderDirectLink?solutionId=**SOLUTION\_ID**\&filterValue=**FILTER\_VALUE**\&type=**BUTTON\_TYPE**
:::
::::

::::Tab{title="Salesforce Classic"}
:::BlockQuote
https\://reportbuilder.cloud4j.com/direct/solution/SOLUTION\_ID?sessionId=SESSION\_ID\&serverUrl=SERVER\_URL\&filterValue=FILTER\_VALUE\&profileId=PROFILE\_ID\&type=BUTTON\_TYPE
:::
::::
:::::

### URL parameters reference

| **Parameter**              | **Description**                                                                                                      |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **SOLUTION\_ID**           | ID of the Solution (example: 99610)                                                                                  |
| **SESSION\_ID**            | `{!$Api.Session_ID}`                                                                                                 |
| **SERVER\_URL**            | `{!$Api.Partner_Server_URL_570}`                                                                                     |
| **FILTER\_VALUE**          | Filter value that will be supplied to the Solution. Usually the record ID (example: `{!Contact.Id}`)                 |
| **PROFILE\_ID** (optional) | `{!User.ProfileId}`This can be used to restrict which profiles are allowed to run Solutions from Salesforce buttons. |
| T**ype**                   | *view / download / send*                                                                                             |

### Additional variables

Optionally, you can pass in additional variables on your Salesforce button using the **pv** prefix.

For example, if you have a Salesforce button on an Account and you want to send a list of Cases IDs, add a request parameter of **pvCaseIds=\{!CasesIds}**. This is mainly used to provide real time filtering of a report such as if you want to let the user select a list of Cases to be included in a report.

### Pre-made URLs

You can copy and paste these  pre-made URLs. Change `{!FILTER_VALUE}` to the field to field you want to filter on, e.g., `{!Contact.Id}`:

::::Tabs
:::Tab{title="Salesforce Lightning"}
- ***View*** `/apex/ReportBuilderDirectLink?solutionId=99610&filterValue={!FILTER_VALUE}&type=view`
- ***Download&#x20;***`apex/ReportBuilderDirectLink?solutionId=99610&filterValue={!FILTER_VALUE}&type=download`
- ***Send&#x20;***`/apex/ReportBuilderDirectLink?solutionId=99610&filterValue={!FILTER_VALUE}&type=send`
:::

:::Tab{title="Salesforce Classic"}
- ***View&#x20;***`https://reportbuilder.cloud4j.com/direct/solution/99610?sessionId={!$Api.Session_ID}&serverUrl={!$Api.Partner_Server_URL_430}&filterValue={!FILTER_VALUE}&type=view`
- ***Download&#x20;***`https://reportbuilder.cloud4j.com/direct/solution/99610?sessionId={!$Api.Session_ID}&serverUrl={!$Api.Partner_Server_URL_430}&filterValue={!FILTER_VALUE}&type=download`
- ***Send&#x20;***`https://reportbuilder.cloud4j.com/direct/solution/99610?sessionId={!$Api.Session_ID}&serverUrl={!$Api.Partner_Server_URL_430}&filterValue={!FILTER_VALUE}&type=send`
:::
::::
::::::

:::WorkflowBlockItem
### Add to the page layout

Save the button and then add the button to the page layouts you want to use the button on.
:::
:::::::

## Running user & permissions

When a Solution is run through a Salesforce button, the running user will be who clicked the button. As such, these users must have access to anything in Salesforce that is required to run that Solution, such as reports, dashboards, objects, fields, etc. Moreover, since everything is run by them, the Solution will only bring in data that the user has access to.

From a security perspective, it is fine to allow all users to run Solutions from Salesforce buttons—Unaric Reports isn’t elevating privileges as it relies on Salesforce’s existing security framework. Hence, admins can set up a single Solution that can be used by many users.
However, there may be times when you only want a Solution to be run using a Salesforce button by specific Salesforce profiles. To do this:

1. On **Unaric Reports**, open the **Solutions&#x20;**&#x70;age and select the solution you wish to administer permissions.
2. Click the **Edit&#x20;**&#x62;utton.
3. On the Solutions Wizard, go to the **Options&#x20;**&#x73;tep.
4. Select the **Configure Profiles** checkbox and select the profiles you want to enable and disable for this Solution.
5. Click **Finish**.&#x20;

:::hint{type="success"}
You can also control which users can see buttons in Salesforce using a combination of Record Types and Page Layouts. Doing it on the Solution ensures users cannot bypass the Record Types and Page Layout setup, for example, by changing the Solution ID on the URL that is opened when they click a button.
:::

