It’s a new year and we’ve made some big changes. Check out Apsona’s all-new pricing bundles for your organization!

View Categories

Using Apsona with Salesforce Lightning

Overview #

With a few exceptions, Apsona provides all its functionality within the Salesforce Lightning Experience. When you click the App Launcher in Lightning, Apsona is available as a choice in the apps popup, and clicking it will display the Apsona screen under the main menu, as expected.

Opening Apsona in a new browser tab #

When running under the Lightning experience, Salesforce displays a menu bar at the top, and that uses additional screen space that you might want to avoid. For this reason, Apsona provides a “pop-out” button that, when clicked, opens Apsona in a new browser tab without the Salesforce menu bar. See screen shot below. This might also be useful when you want to retain an open Apsona window within which to work, while using other tabs to navigate within Salesforce.

Whitelisting the org subdomain #

For the Apsona pages to function correctly under lightning, it is necessary to add a whitelist entry for your Salesforce org’s main Lightning URL. Without this step, the Apsona pages will appear empty, and Apsona components will not work. To add this entry, the steps are as follows:

  1. Determine the “my domain” name of your org. It is the name that appears to the left of the .lightning.force.com in your org’s Setup URL.
  2. Click Setup – Security – Session Settings, and scroll down to the Whitelisted Domains for Visualforce Inline Frames section.
  3. Click the Add Domain button. In the resulting screen, put in the domain URL in the form https://myDomainName.lightning.force.com where myDomainName is the “my domain” name of your org. Click Save.

Known issues and limitations #

The following are the known limitations under the Lightning Experience.

JavaScript buttons unavailable #

JavaScript buttons are not available in the Lightning experience. Therefore, to use Apsona’s document merge buttons within Salesforce detail pages, you will need the Apsona Lightning component.

Document object unavailable #

The Document object is not available in the Lightning experience, so when using Lightning, you will not be able to upload a document template for use with the Document generator. One way to resolve this issue is to use the Apsona Documents view to manage, upload and replace Documents. The other way is to switch to the Classic experience before doing the upload.

Clickjack protection #

In orgs without “my domain” enabled, the Apsona page displays completely empty if you enable clickjack protection for the Apsona Visualforce page. For the same reason, the Lightning component button for generating documents also fails silently, with no errors. The workaround is to disable clickjack protection for the page.

You can access the clickjack protection setting in the Lightning experience by clicking Setup – Security – Session Settings, and scrolling down to the Clickjack Protection section. See screen shot below. Notice that you need to un-check just the box that says “Visualforce pages with headers disabled”. Typically, this limits this setting specifically to application pages from Salesforce partners whose pages are hosted on secure Salesforce subdomains separate from the main Salesforce domain.

Clickjack Protection and Button Merge Actions in Lightning #

If user have created a Button Merge action on a Lightning record page and see a Clickjack Protection error when running it, the issue is usually caused by an incorrect Trusted Domain configuration.

Cause
Adding only the *.vf.force.com domain to Salesforce Trusted Domains is not sufficient. That domain applies to Visualforce pages, but Button Merge actions executed from a Lightning record page require the parent Lightning domain to be trusted.

Resolution
Add the full Lightning domain of the record page to Trusted Domains:

  1. Open the Salesforce record page where the Apsona button is used.

  2. Copy the domain from the browser address bar (e.g.,
    https://yourdomain.lightning.force.com).

  3. Navigate to Setup → Security → Trusted Domains.

  4. Add the Lightning domain and enable it for Visualforce and Lightning.

Once added, the button will run successfully without disabling Clickjack Protection.