Hello Experts,
I am working on Virtual entity and i am retrieving data from Azure SQL database for that I have written OData which retrieves Sql data from Azure SQL Database. I am trying to mapping data to virtual entity fields but data is not showing.
OutPut of ODataservice:
URL: http://sqldb.azurewebsites.net/$metadata
{ "odata.metadata":"http://sqldb.azurewebsites.net/$metadata#Contacts","value":[ { "id":"1","Name":"abc1","Phone":"1111111111","Email":"abs@gmail.com","Address":"India" },{ "id":"2","Name":"abc2","Phone":"2222222222","Email":"afgs@gmail.com","Address":"India" },{ "id":"3","Name":"abc3","Phone":"3333333333","Email":"adfr@gmail.com","Address":"India" },{ "id":"4","Name":"abc4","Phone":"4444444444","Email":"sdy@gmail.com","Address":"India" },{ "id":"5","Name":"abc5","Phone":"5555555555","Email":"xyz@gmail.com","Address":"India" } ] }
But I am enable to get data, I am getting below type of error,
How to resolve that issue?
From References:
1. https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/virtual-entity-walkthrough-using-odata-provider
2. https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/create-edit-virtual-entities
There could be something wrong when the virtual entity is configured, you can raise a support team for Microsoft support team for further deeper investigation.
Thanks for reply winston he,
I have added contactId as a guid and mapped on Primary Key but I am getting same error
URL: dynamisitysqldb.azurewebsites.net/$metadata
URL: dynamisitysqldb.azurewebsites.net/Contacts
for Virtual Entity Data Sources
TimeOut: 120
Pagination Mode: Server-side Paging
Return Inline Count: False
I tried all the possibilities into the url and pagination mode but getting same error,
The reason is because there is no property of GUID type for your entity. To create a virtual entity and map it to CRM entity, there must be a GUID property. You can try this OData demo service and it will be fine:
NOTE:contactId will be GUID field which is necessary.
winstonodata4.azurewebsites.net/$metadata
...
"
</Key>
<Property Name="contactId" Type="Edm.Guid" Nullable="false"/>
<Property Name="name" Type="Edm.String"/>
<Property Name="address" Type="Edm.String"/>
<Property Name="email" Type="Edm.String"/>
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Mansi Soni as our August 2025 Community…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 100 Super User 2025 Season 2
Suresh Kulla 72 Super User 2025 Season 2
DAnny3211 54