Working with Salesforce table using Leapwork
Working with Salesforce table using Leapwork
Introduction
Below are the steps to configure ODBC Driver for Salesforce Database.
Prerequisites
- ODBC driver with 64-bit version must be installed on your system.
- User must be able to access Salesforce database by Salesforce user name and password.
Configure ODBC
Open 64-bit ODBC App in your system.
Click on Add button.
Select ODBC Driver for Salesforce (we have used Devart ODBC driver for Salesforce).
Enter a logical name for ODBC data source, and fill other related details:
| 1 | Name is used in database block as "Connection" while accessing database from Leapwork. |
| 2 | Enter meaningful description. |
| 3 | The server you want to connect with. |
| 4 | The user id of your Salesforce account. |
| 5 | The password of your Salesforce account. |
| 6 | The “Test Connection” to test the connection. |
"Connection Successful!!" message shown above shows that you are ready with connectivity.
Close all windows by pressing OK button, now you are ready to access the database using Leapwork.
How to create table in Salesforce
01. Login to Salesforce using your credentials.
Type Object in Quick Find bar and press Enter.
Click on Object Manager.
Click on Create → Custom Object.
Provide the Name of the table that you want to create.
Click on save.
We need to remember that while working with the Salesforce tables we have to use API Name of the tables and Fields.
Create tab for the table created before inserting the fields.
Home → Type “Tabs” in Quick Find and click on Tabs
- Click on “New” in Custom Object Tabs
Select the Object Name and Tab Style and click next.
Click next.
Click on save
Navigate to Homepage and click on more, here you will see your newly created table.
Click on the table name and you will see a blank screen with no records.
Change the view to All and click on New button to add new record.
On clicking on new button, a new pop-up window will open where you can enter the value.
After entering the value click on Save to save the record OR click on Save & New to Save a record and create a new entry.
Interacting with Salesforce table using Leapwork.
Select/Insert/Update/Delete all these operations can be performed using Leapwork studio.
Select Query (Please note that extra fields shown while performing select query are system populated fields).
Insert Query (Please note we must use Field API name while using Insert Query).
Added new record.
- Update Query (Please note we must use Field API name while using Update Query).
Updated Field
- Delete Query (Please note we must use Field API name while using Delete Query).
Record deleted.
For any clarification, contact our Priority Support.