web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

DataEntity error: Datasource must have at least one relation

(0) ShareShare
ReportReport
Posted on by

Hello all,

While creating new Data Entity, I'm hit an error like in the subject.

So here is the action:

1. In the new data entity, main data source is table ForecastSales

2. Then add new data source, table InventDim, with JoinMode=OuterJoin and Use Relation=Yes

Aren't the 2nd point, UseRelation means it will take the Relation set in AOT (based on the help text as well). If I checked in AOT of ForecastSales standard, they have relation to InventDim and set the relationkey which is InventDimId.

Why in my Data Entity, still needs to define the relation, if I already set UseRelation to Yes ?

Kindly advice,

Thanks,

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Does it work with Use Relation=No and setting the relation explicitly, either by name or by manually mapping fields?

    I've run into problem with 'Use Relation' too (in D365FO) and I tend to use the other approach in data entities.

  • Community Member Profile Picture
    on at

    Hi Martin,

    Yes, if set to No, And set the relation name after add new relation like below:

    pastedimage1600701768070v1.png

    and I bet, by specifying the field explicitly (field and related field) will also work.

    So, it's just not working then, for the UseRelation ?

    Thanks, 

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Wwong,

    I have faced the same issue before, while adding data sources manually in a data entity. Adding relations manually resolved the issue.

  • Community Member Profile Picture
    on at

    hmm.. ok.

    So probably this UseRelation is not meant for Data Entity then.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi WWong,

    UseRelations works if the child table has a relation. For an example, RetailCustTable has a relation with CustTable.

    pastedimage1600703368295v1.png

    In the CustCustomerDetailsV2Entity, UseRelations is marked on RetailCustTable and the same relation is picked up.

    pastedimage1600703467296v2.png

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi WWwong,

    Another example similar to your entity is SalesOrderHeaderV2Entity. SalesTable has a relation "WorkerSalesTaker_FK" with table HcmWorker related to WorkerSalesTaker field. In the entity the relation is specified explicitly and the UseRelations is set to "No".

    pastedimage1600704762218v1.png

    So, this property works only if the relation is on the particular dataset (as is the case with RetailCustTable above).

  • Community Member Profile Picture
    on at

    Hi Gunjan,

    I think that too has been put manually.

    At first, based on your description, I thought it will works if the parent data source of data entity is actually the "child" of a table in AOT then the relation in that data entity is "parent" in AOT. So I just tried to add again ForecastSales as the child of InventDim and put UseRelation to Yes. Still the same error.

    pastedimage1600704569985v1.png

    pastedimage1600704644107v2.png

    Btw, InventDim did has a relation in ForecastSales, 

    pastedimage1600704888577v3.png

    So I guess, it is not working for Data Entity. 

    Thanks,

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    I think that's correct. Maybe it works only if you use the data entity creation wizard.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans