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
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
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.
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.
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
So smart of you Mariano.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,122
André Arnaud de Cal... 918 Super User 2025 Season 2
Sohaib Cheema 646 User Group Leader