Skip to main content
Version: 6.0

Installation

Prerequisites

  • b+s Connects for Salesforce package installed and configured.
  • Integration API in Lightning checkbox is enabled in the b+s Configuration in use.

Create the Lightning Message Channel

With the enhancement of Salesforce security features, the responsibility for creating and maintaining Lightning Message Channels now lies with Org Administrators. These channels are required to enable communication between Lightning components loaded within the DOM. The b+s Components require a Lightning Message Channel to communicate with the base connector.

Follow the official Salesforce documentation to deploy the LMC in your Org.

Alternatively, you can use your own tools for this purpose.

At the time of publication, Salesforce also provides the Web Console (Beta). To use this option, follow the official Salesforce documentation to enable Web Console for your org and then use it to create and deploy the LMC and the b+s Components.

Code Example

The following file is to be deployed in force-app/main/default/messageChannels/

Filename

cnxMessageChannel.messageChannel-meta.xml

Code

<?xml version="1.0" encoding="UTF-8"?>
<LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel>cnxMessageChannel</masterLabel>
<isExposed>true</isExposed>
<description>Message Channel required by b+s Components to communicate with the base connector</description>
</LightningMessageChannel>
info

Only one Lightning Message Channel is required to support messaging across all components.

Common configuration steps for all b+s Components

  1. Enable the Integration API in the b+s Configuration record in use. (Enable Integration API).
  2. Create a Lightning Message Channel (LMC) in your org. See Create a Lightning Message Channel. You only need one LMC for all b+s Components.
  3. Register the cnxMessageChannel__c LMC in b+s Configuration | Integrations | Configure Messaging Channel ref.

Optional: Update all existing b+s Configuration records

danger

This script updates all existing b+s Configuration records and overwrites the current Messaging Channel value.

Run it only if you understand the impact, because existing values are replaced in bulk, changes are saved immediately for all users, and rollback requires a manual recovery step such as restoring previous values.

To ensure all existing b+s Configuration records use the new Lightning Message Channel, run the following Apex script as Anonymous Apex in the Developer Console:

List<cnx__Connects_Configuration__c> configs = [
SELECT
Id, cnx__LMC__c
FROM
cnx__Connects_Configuration__c
];

for (cnx__Connects_Configuration__c cfg : configs) {
cfg.cnx__LMC__c = 'cnxMessageChannel__c';
}

update configs;

Deploy components

Follow the official Salesforce documentation to deploy the b+s Components in your Org.

Alternatively, you can use your own tools for this purpose.