How to view Salesforce data in RAD Studio Data Explorer using the Enterprise Connectors for Salesforce.
With the Enterprise Connectors for Salesforce, you gain access to live Salesforce data within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve and update Salesforce data. This article will walk through connecting to Salesforce using the Data Explorer.
Connecting to Salesforce Data Using Data Explorer
You can create a simple application for displaying Salesforce data by utilizing the Enterprise Connectors for Salesforce and a new VCL Forms Application:
- Open the Data Explorer in RAD Studio and expand FireDAC.
Right-click on CData Salesforce Data Source and click Add New Connection.
- Name the connection.
Fill in the necessary connection parameters and click OK.
There are several authentication methods available for connecting to Salesforce: Login, OAuth, and SSO. The Login method requires you to have the username, password, and security token of the user.
If you do not have access to the username and password or do not wish to require them, you can use OAuth authentication.
SSO (single sign-on) can be used by setting the SSOProperties, SSOLoginUrl, and TokenUrl connection properties, which allow you to authenticate to an identity provider. See the "Getting Started" chapter in the help documentation for more information.
- Back in the Data Explorer, expand the tables for the connection.
Create a new VCL Forms application and drag a table (for example: Account) onto the form.
- Select the AccountTable object on the form and set the Active property to true.
Right-click on the object, bind visually, and link everything (*) to a new control (TStringGrid).
Arrange the TStringGrid on the form and run the application to see the Account data.
Ready to try the Enterprise Connectors? Download the beta builds today. Just open RAD Studio 10.2, navigate to Tools > GetIt Package Manager and select from over 70 connectors. Requires RAD Studio Pro or higher editions.