Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Cannot retrieve data using Virtual Entity in Dynamics 365

Posted on by 5

Hello,

I am trying to retrieve the data using virtual entity, but it is not working.

Initially i had tried using a test api : http://api.purdue.io/odata/ and created all the entity mappings and it worked fine and was able to retrieve all the data.

Now i am trying to access the data from the Dynamics 365 instance (Account Entity) data into my virtual entity.

So i am using the below instance url which gives me the odata.context in my configuration

https://test.api.crm8.dynamics.com/api/data/v9.1/

 

2577.6320.1.png

After that i had created the virtual entity as below with the Account mapping :

5282.6320.1.png

Following this, i had created the field mapping in which i mapped the accountid(Primary key) and name(String).

When i try to access, i get the below error:

3644.3757.Capture.PNG

Could anyone guide me regarding the same. Also let me know if i have to pass any credentials while accessing this as the parameter. 

Thanks,

Greesh

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: Cannot retrieve data using Virtual Entity in Dynamics 365
    Hi
     
    Purpose of the virtual entity is to retrieve the data or view the third party data in D365.  Data service should be expose by OData protocol. 
     
    URL : Third party URL not a D365 WebAPI URL.
    5047.MicrosoftTeams_2D00_image-_2800_1_2900_.png
  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Cannot retrieve data using Virtual Entity in Dynamics 365

    Hi Greesh11,

    Yes, you need to register a plug-in with credential into your CRM server because the default data source is exposed with OData V4 service .

    Please articles below for reference:

    https://community.dynamics.com/crm/b/jasonlattimersblog/archive/2017/12/18/creating-a-custom-virtual-entity-data-provider 

    There is sample code here:

    https://alexanderdevelopment.net/post/2018/05/28/using-dynamics-365-virtual-entities-to-show-data-from-an-external-organization/ 

    Regards.

    Clofly

  • Greesh11 Profile Picture
    Greesh11 5 on at
    RE: Cannot retrieve data using Virtual Entity in Dynamics 365

    Image of the Virtual Entity mapping :

    1072.2474.Capture1.PNG

    Also the Odata Screenshots for both field:

    1072.2474.Capture1.PNG8424.5187.Capture2.PNG

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.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans