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, ...
Answered

Computed columns and Virtual fields on Data entities

(0) ShareShare
ReportReport
Posted on by 30

hi

please let me know about Computed columns and Virtual fields on Data entities. is virtual fields and Computed columns both are same?

please give me more shed on this

thanks!

I have the same question (0)
  • Blue Wang Profile Picture
    on at

    Hi @rp@n,

    Please check Doc:docs.microsoft.com/.../data-entity-computed-columns-virtual-fields

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi @rp@n,

    You could say that they are the same, but computed fields are translated to SQL and therefore they are better from a performance point of view for entities used for exports. Virtual fields can you used in the import scenarios, to bring additional data that is not available on data sources but needed for an entity, but it's slower from an export perspective and you can't skip staging data for export scenarios in this case.

    Do you have a specific scenario where you want to use one of these fields?

    There is a good explanation in the docs about it.

    docs.microsoft.com/.../data-entity-computed-columns-virtual-fields

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Arpan,

    They are not the same.

    Values for computed fields are generated by an SQL view computed column whereas that of a virtual fields are generated by X++ code. You can see examples here.

  • Verified answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    hi,

    They are definitely not the same.  

    You should check docs.microsoft.com/.../data-entity-computed-columns-virtual-fields for Ms docs information.

    Performance varies drastically from Virtual columns VS Computed columns. There are scenarios where you would need virtual fields but try to avoid them as much as possible.

  • @rp@n Profile Picture
    30 on at

    I go through the link and what I understand

    1. As much as possible, recommended to use Computed columns instead of Virtual fields because Computed columns are computed in SQL whereas Virtual fields are  computed in X++.

    2. Computed columns , mostly used for read purpose only.

    3. We need to create a new method to populate value in Computed column. The method name should be matched with DataEntityView method.

    4. In Virtual field, to populate data we need to override PostLoad method of Data entity.

    5. DataEntityViewMethod and

    IsComputedColumn these 2 properties need to set based on Computed columns or Virtual fields.

    If anything else I missed, please add.

    Is it correct?

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Arpan,

    I think theoretically you got everything regarding these two types of fields.

    To get a better understanding of how you would implement one of the other, you need to work try them out in a custom data entity.

  • @rp@n Profile Picture
    30 on at

    Sure, I will

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans