Using Objects with Salesforce
With Liferay, you can create objects that integrate with Salesforce objects and use Salesforce as an external storage system. Once integrated, the Liferay object’s data is only stored in Salesforce and both systems are automatically updated whenever users add, update, or delete entries in either context.
Using this integration requires a standard or custom Salesforce object, as well as a Salesforce connected app for Liferay with OAuth enabled. See Preparing Salesforce for more information.
To use this feature, enable the Proxy Object (LPS-135430) feature flag
Preparing Salesforce
Salesforce connected apps are frameworks for allowing external applications to integrate with your Salesforce account via APIs and standard protocols (e.g., SAML, OAuth). Before proceeding, create a connected app to enable your Liferay instance to integrate with Salesforce.
When setting up the connected app in Salesforce, enable and configure OAuth for the API integration with Liferay. During this process, be sure to copy the OAuth consumer key and secret. These details are necessary when configuring your Liferay instance.
Before creating your Liferay object, ensure your standard or custom Salesforce object includes all desired fields. These fields must be defined before you can link Liferay object fields to them.
Configuring Your Liferay Instance
Follow these steps to connect your Liferay instance to Salesforce:
-
Open the Global Menu (), go to the Control Panel tab, and click Instance Settings.
-
Click Third Party and go to the Salesforce Integration tab.
-
Enter your Salesforce login info and OAuth credentials for the Liferay connected app.
For Login URL, you can use
https://login.salesforce.com/
or the login URL for your Salesforce domain. -
Click Save.
Creating a Liferay Object with the Salesforce Storage Type
Creating a Liferay object for storing data in Salesforce follows the same standard process for creating any a standard custom object. The only difference is you must select the Salesforce storage type during draft creation. This configures the object to use Salesforce as an external storage system. See Creating Objects for detailed instructions.
After creating the object draft, add fields for each custom field in the Salesforce object. To prevent data loss, ensure each field corresponds to a custom field in the desired Salesforce object. Then edit each field and add external reference codes that link to the desired Salesforce fields. For each ERC, use the name of the corresponding custom Salesforce field (e.g., Title_c
, Due_Date__c
).
Once published, the Liferay object’s data is only stored in Salesforce. Both systems are automatically updated whenever users add, update, or delete entries on either side of the relationship.