Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Can we create an entity from View

(0) ShareShare
ReportReport
Posted on by 64

Hi,

I have a view which is having query as datasource. ( the query is bit complicated).

Now the requirement is that to have the view as a entity.

I think it is not possible to expose a view as an Odata feed /entity.

However I would like to check if it is a possibility or an alternative to this ?

Thanks,

VK

  • Komi Siabi Profile Picture
    Komi Siabi 12,725 Most Valuable Professional on at
    RE: Can we create an entity from View

    So smart of you Mariano.

  • RE: Can we create an entity from View

    I have done many entities wich uses views as datasource, as Martin says the wizard will complain because the view doesn't have a primary key, but what I usually do is to create the entity using the wizard an a simple standard table, choose the fields from the primary key to be added to the entity, name the entity as per your convenience, once the wizard creates all the objects change the datasource of the created entity with the view, upgrade the entity key and add the fields you need, finally upgrade the staging table. Of course, what you get is a read only entity as you're using a view, but you can still use it for OData query purposes, of for BYOD

  • Martin Dráb Profile Picture
    Martin Dráb 230,340 Most Valuable Professional on at
    RE: Can we create an entity from View

    Do you get any error if you actually try it? Note that you shouldn't give up if it's not supported by the wizard - it still may be possible if you do it manually.

  • vicky1234 Profile Picture
    vicky1234 64 on at
    RE: Can we create an entity from View in D365 FO

    Thanks for your reply.

    Actually what I want to understand is that is there a way to expose a complicated query/viewas a datasouce in an entity so that it can be used as read-only entity.

  • Suggested answer
    Komi Siabi Profile Picture
    Komi Siabi 12,725 Most Valuable Professional on at
    RE: Can we create an entity from View in D365 FO

    Hi VK,

    Just like you said, you can not see Views as datasource while creating data entities.

    You should consider using composite entities where you can bring in multiple entities.

    docs.microsoft.com/.../develop-composite-data-entities

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,340 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans