Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Virtual Entity: Entity could not be retrieved from data source

Posted on by Microsoft Employee

Hi,

I am trying to use the Virtual Entity data source feature with an OData 4.0 endpoint, but I am getting the below error after configuring my entity.

Error.PNG

Here is a simple Entity that I have configured

Entity.PNG

and the Fields:

Field1PK.PNG

Field2.PNG

Field3.PNG

Here is the Metadata:

metadata.PNG

and response:

response.png

Can anyone help me, what am I missing or doing incorrectly?

Thanks,

Sai

  • RE: Virtual Entity: Entity could not be retrieved from data source

    Hello -

    Is it possible for you to share a recent API request id?  With that I can take a look.  

    Thanks,

    Brandon

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Virtual Entity: Entity could not be retrieved from data source

    Mike

    I have the same issue too with an ODATA source - is there any way to find out what is happening ?

    Turning on plugin tracing makes no difference- and I have fallen at the end of a long development journey.

    We have the ODATA endpoint but it is not connecting - my guess it is to do with $skip as that seems not to be working too well on our endpoint.

    Any light you could shed would be great..

    Thank you..

    <edmx:Edmx xmlns:edmx="docs.oasis-open.org/.../edmx&quot; Version="4.0">

    <edmx:DataServices>

    <Schema xmlns="docs.oasis-open.org/.../edm&quot; Namespace="CallDetailsDB">

    <EntityType Name="CallDetail">

    <Key>

    <PropertyRef Name="cdrguid"/>

    </Key>

    <Property Name="cdrguid" Type="Edm.Guid" Nullable="false"/>

    <Property Name="cdate" Type="Edm.String"/>

    <Property Name="ctime" Type="Edm.String"/>

    <Property Name="canumber" Type="Edm.String"/>

    <Property Name="cbnumber" Type="Edm.String"/>

    <Property Name="ctype" Type="Edm.String"/>

    <Property Name="crate" Type="Edm.String"/>

    <Property Name="cstatus" Type="Edm.String"/>

    <Property Name="nduration" Type="Edm.Decimal"/>

    <Property Name="nprice" Type="Edm.Decimal"/>

    <Property Name="cisocurrency" Type="Edm.String"/>

    <Property Name="ctag" Type="Edm.String"/>

    <Property Name="cband" Type="Edm.String"/>

    <Property Name="caccount" Type="Edm.String"/>

    <Property Name="cbilled" Type="Edm.String"/>

    <Property Name="billid" Type="Edm.Int32"/>

    <Property Name="ctext" Type="Edm.String"/>

    <Property Name="suspenseid" Type="Edm.Int32"/>

    <Property Name="siteid" Type="Edm.Int32" Nullable="false"/>

    </EntityType>

    <EntityContainer Name="CallDetailsContainer">

    <EntitySet Name="CallDetails" EntityType="CallDetailsDB.CallDetail"/>

    </EntityContainer>

    </Schema>

    </edmx:DataServices>

    </edmx:Edmx>

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Virtual Entity: Entity could not be retrieved from data source

    HI ,

    Were you able to resolve this issue. I too am facing thios same issue. Any help will be great.

    Regards,

    Sashi

  • RE: Virtual Entity: Entity could not be retrieved from data source

    That works.  You reach me at mcarter@microsoft.com with environment info to move forward.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Virtual Entity: Entity could not be retrieved from data source

    Hi Mike,

    I have exhausted all my options, no luck so far. Will you be able to take a quick look at my test environment and see if you can find any error? I can share the access to the CRM environment. Please let me know if that sounds good

    Thanks

    Sai

  • RE: Virtual Entity: Entity could not be retrieved from data source

    The endpoint does not need to have SSL enabled.  I wouldn't expect the port in the URL to cause a problem, but it does need to be internet facing.  The call to retrieve the data is coming from the server side and not your client.  We don't currently have a way to check that CRM can reach the web service, but that's a good idea we should consider for a future release.

    Thanks,

    Mike

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Virtual Entity: Entity could not be retrieved from data source

    Hi Mike,

    I have had no luck so far. I have tried it with 3 other instances, and I am seeing the same error across. Couple of questions

    1. Does the endpoint needs to have SSL enabled?

    2. Does it work with development endpoints with portnumber in the URL, say like http://<server>:<port>/api/odata4/<endpointname>. This is publicly accessible btw.

    3. My endpoint uses a Basic Auth, and I have them as a header(copied the header from Postman) when I configured it in Virtual Entities. Is there a way that I can debug if CRM is able to connect successfully to the endpoint?

    Sai

  • RE: Virtual Entity: Entity could not be retrieved from data source

    Hi Sai -

    Yes.  That version did have the fix for the issue I was referring to.

     

     Typically you might see this issue if your External Name values were incorrect or the Field Requirement was wrong, ie Optional when it should be Business Required.  As far as I can tell, that doesn't appear to be the issue here. 

     

    Have you had any luck?  Let me know if you are still seeing this issue and we can take a deeper look.

     

    Thanks,

    Mike

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Virtual Entity: Entity could not be retrieved from data source

    Hello Mike,

    The version number for my instance is Version 1612 (9.0.1.733) (DB 9.0.1.733) online

    Thanks

    Sai

  • RE: Virtual Entity: Entity could not be retrieved from data source

    Hi Sai -

    The configuration above looks good to me.  You may be hitting an issue that we addressed in an update to service we just deployed this week.  Can you let me know the version number of your instance?  You can find this in the About box by clicking on the gear icon in the navbar at the top of the web client.

    Thanks,

    Mike Carter

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans