Microsoft introduced a new feature called Virtual Entity which will help you access data residing in an external system via OData 4.0 API. You can build your own OData API for your database, plug it in to Dynamics 365 to access your data which would take significant development, maintenance and testing efforts. With Progress Hybrid Data Pipeline, you get an out of the box solution which will help you create an OData 4.0 endpoint, which you can configure as Virtual entity and access your data. In this tutorial, we will walk you through how you can use the virtual entity feature by showing how you can access SQL Server data using OData API generated by Progress Hybrid Data Pipeline.
Follow the below tutorials on how to install Progress Hybrid Data Pipeline in Azure or AWS
For AWS
For Azure
Important: Make sure you redirect traffic on 80 ports on your machine to port 8080 of HDP server using a proxy or firewall rules. This is important, as Dynamics CRM will not work if your endpoint URL has a port in it.
Enabling On-Premise Connectivity (if applicable)
If your database is behind a corporate firewall or in a private network, you can use our On-Premises connector which will enable a secure connection to your database for Hybrid Data Pipeline Server, without having to open any ports in your firewall. To get started, you would need to install this On-Premises Connector on your on-premise infrastructure as the name suggests. Follow the below tutorial on how to install the On-Premises Connector.
If Hybrid Data Pipeline Server is on AWS
If Hybrid Data Pipeline Server is on Azure
The URL might be of following format : https://server_name:8443/api/odata4/SQLServer/ , but you should be able to access it via https://server_name/api/odata4/SQLServer (if SSL enabled) or http://server_name/api/odata4/SQLServer as you have redirected traffic.
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
edmx:Edmx
xmlns:edmx
=
"http://docs.oasis-open.org/odata/ns/edmx"
Version
=
"4.0"
>
<
edmx:DataServices
>
<
Schema
xmlns
=
"http://docs.oasis-open.org/odata/ns/edm"
Namespace
=
"SQLServer"
>
<
EntityType
Name
=
"Customer"
>
<
Key
>
<
PropertyRef
Name
=
"CustomerId"
/>
</
Key
>
<
Property
Name
=
"CustomerId"
Nullable
=
"false"
Type
=
"Edm.Guid"
/>
<
Property
Name
=
"FirstName"
Nullable
=
"false"
Type
=
"Edm.String"
MaxLength
=
"40"
/>
<
Property
Name
=
"LastName"
Nullable
=
"false"
Type
=
"Edm.String"
MaxLength
=
"20"
/>
<
Property
Name
=
"Company"
Type
=
"Edm.String"
MaxLength
=
"80"
/>
<
Property
Name
=
"Address"
Type
=
"Edm.String"
MaxLength
=
"70"
/>
<
Property
Name
=
"City"
Type
=
"Edm.String"
MaxLength
=
"40"
/>
<
Property
Name
=
"State"
Type
=
"Edm.String"
MaxLength
=
"40"
/>
<
Property
Name
=
"Country"
Type
=
"Edm.String"
MaxLength
=
"40"
/>
<
Property
Name
=
"PostalCode"
Type
=
"Edm.String"
MaxLength
=
"10"
/>
<
Property
Name
=
"Phone"
Type
=
"Edm.String"
MaxLength
=
"24"
/>
<
Property
Name
=
"Fax"
Type
=
"Edm.String"
MaxLength
=
"24"
/>
<
Property
Name
=
"Email"
Nullable
=
"false"
Type
=
"Edm.String"
MaxLength
=
"60"
/>
</
EntityType
>
<
EntityContainer
Name
=
"dbo"
>
<
EntitySet
Name
=
"Customers"
EntityType
=
"SQLServer.Customer"
/>
</
EntityContainer
>
</
Schema
>
</
edmx:DataServices
>
</
edmx:Edmx
>
We hope this tutorial helped you in accessing your external data in SQL Server or on-premises database from Dynamics CRM. Feel free to try Progress Hybrid Data Pipeline and let us know if you have questions or issues.