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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to Data entity as data source in a data entity in d365 fo

(2) ShareShare
ReportReport
Posted on by 338
Hi All,

I created custom data entity, but I want to add  standard 'docurefentity' as data source in my custom data entity like below . I tried to add by clicking on 'new data source' but the entity name does not showing in data source properties under table.

Categories:
I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,421 Super User 2026 Season 1 on at

    Hi cbaren12,

     

    In Dynamics 365 Finance and Operations, using a data entity as a data source within another data entity—like trying to add DocuRefEntity—is not directly supported in the same way as adding tables. Data entities are designed to expose data externally and are not meant to be nested as data sources within other entities.

     

    ✅ Recommended Approach

     

    1. Use the Underlying Table Instead

      Instead of adding DocuRefEntity, add the DocuRef table directly as a data source in your custom data entity. This gives you access to the document reference data and allows you to define relationships and mappings.


    2. Define Relationships Manually

      Create a relation between your primary data source (e.g., SalesTable, VendTable, etc.) and DocuRef using the appropriate foreign key (e.g., RefRecId, RefTableId). This ensures the document references are correctly linked.


    3. Expose Fields via Staging or Extension

      If you need to expose DocuRefEntity fields specifically, you can:

       

      • Extend your custom entity to include those fields.

      • Use computed columns or unmapped fields to pull in data from DocuRef.

    4. Use Composite Entities (Advanced)

      For more complex scenarios, consider creating a composite entity that combines multiple entities or tables, though this requires careful design to maintain performance and data integrity.



    5.  
     

    Unfortunately, data entities cannot be used as direct data sources within other entities due to their abstraction layer. Working with the underlying tables is the best route.

     

    Thanks and best regards,

    Daniele

    Note: This response was prepared with support from Copilot to ensure clarity and completeness.

  • Suggested answer
    Raj Borad Profile Picture
    1,570 on at
    Hi,
     
    As seen in the image, The Table property only allows tables and views, not entities.
    What you saw in the image is MS's standard entity built with DocuRefEntity table as the source.
    Use DocuRef table which has a relation with CustTable.
     
    Thank you,
    Raj D Borad
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    304,711 Super User 2026 Season 1 on at
    Hi Charan12, 

    Can you explain if you can't select the table in the Data entity creation wizard or when editing an existing entity? 
    Like Microsoft can add this data entity as table in a data entity, so can you.
     
    You can either first create a data entity using the wizard, provide the names as you would like to have and use another table. After creating the wizard, you can delete all fields and change the table property to include the DocuRefEntity as table. It even shows up in the table list here.
     
    You can also duplicate an existing "attachment" entity and make changes as per your requirements.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 608

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 591 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans