In the 2020v1 release of ComponentOne, we added DataConnector service components, which can be used to connect to business solutions like Microsoft Dynamics 365 and OData. In the 2020v2 release, we also added the support for Salesforce and Kintone. This post demonstrates how to integrate Salesforce with Entity Framework using the ComponentOne DataConnector.

Salesforce is a cloud-based Customer Relationship Management platform that helps companies manage customer data and its related processes.

Salesforce provides its own set of tools that different companies use to improve upon their customer service relationships. Let’s discuss an example of how ComponentOne DataConnector and FlexGrid can be useful for businesses to consume data from Salesforce and perform actions that are not available out of the box in Salesforce.

Let’s take an example of an online service provider, which needs to keep track of its customers’ monthly subscription status and generate custom reports based on the subscription records in Salesforce.

These are some of the views/reports they may need to evaluate the subscription status:

  • Paid and unpaid subscriptions
  • Subscriptions grouped by country
  • Sorting subscription by data

Querying Data in Salesforce

Before we explain the usage of C1 DataConnector with Salesforce, let’s discuss the default mechanism of Salesforce to query data objects.

Salesforce provides native SOQL (Salesforce Object Query Language) to query records; however, there are certain limitations with this approach:

  • Generating these reports would require end-users to learn this syntax.
  • Simple operations like grouping, sorting or filtering would require users to query data each time.

Integrating Salesforce with Entity Framework Using the ComponentOne DataConnector

Using C1 Data Connector and FlexGrid with Salesforce Data

The C1 DataConnector is the workhorse that manages the connection to the Salesforce data and queries the underlying Subscription data. Once we have the this data, ComponentOne’s Flexgrid will be used to display these records in a grid.

Using ComponentOne FlexGrid operations like grouping, sorting, filtering, search, and validations can be performed on subscription data (by end-users) without directly asking Salesforce.

Now that we understand how it fits in together, let’s create our application!

Step 1: Setup and Enabling OAuth

Before we proceed to connect to Salesforce, we will need to create an application and use the credentials of this application for establishing connection.

Please go through this Salesforce resource that explains how to setup an application to enable OAuth to authenticate an application:

The following information is required in order to connect to Salesforce:

  1. Token Endpoint (https://ap16.salesforce.com/services/oauth2/token)
  2. Api URL (https://ap16.salesforce.com/services/data/v45.0)
  3. Client ID
  4. Client Secret
  5. Salesforce username and password
  6. Security token

Most of the above credentials will be available on the application page in Salesforce and security token would have been sent to the registered email used for creating the Salesforce account.

The image below displays the OAuth Client Id (Consumer Key) and OAuth Client Secret (Consumer Secret).

Integrating Salesforce with Entity Framework Using the ComponentOne DataConnector

Now we have the required information for connection to Salesforce, we will create an application that will use DataConnector.

#.net #desktop

Integrating Salesforce with Entity Framework (Using the ComponentOne DataConnector)
1.50 GEEK