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, ...
Suggested Answer

virtual field not coming in the sql

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    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?

  • Sergei Minozhenko Profile Picture
    23,093 on at

    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)

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Please share your code, and the properties of your field. Also, virtual fields don't work in SQL queries, only computed columns do. 

  • Suggested answer
    Faisal Fareed Profile Picture
    10,796 User Group Leader on at

    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

  • Blue Wang Profile Picture
    on at

    Hi AXBeginner,

    Explanation of properties of virtual fields and computed columns:

    731824.PNG

    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.

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 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans