Notifications
Announcements
No record found.
I have created a custom entity. In that entity i have added a virtual field to get the enum label values of a enum field .I have written the code in the postload method to insert data into virtual field.But that field is not appearing in the sql and OData.Could please help me what is the issue.I have done build sync and full build of my model
Hi AX@beginner,
The virtual field won't be available in SQL view. You will need to use a computed field for that. How are you querying this entity from Odata? Are you using code or using an Odata query from a browser?
Hi AX@Beginner,
Could you, please, share properties for your virtual field?
By the way, it's better to create a computed field from a performance point of view (check DirPartyBase.PartyType method and PartyType field)
Please share your code, and the properties of your field. Also, virtual fields don't work in SQL queries, only computed columns do.
Virtual fields are not the actual fields (as by the name it dictates) so do not get created in SQL. Virtual fields are generally used for intake where you have to do calculations using X++. If you want to test your data in virtual fields have a look on this link docs.microsoft.com/.../data-entity-computed-columns-virtual-fields
Hi AXBeginner,
Explanation of properties of virtual fields and computed columns:
Virtual fields are supported only on data entities not views.
You need to accept the above suggestions and use computed columns.
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 Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 565 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader