web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Post load method in d365fo

(0) ShareShare
ReportReport
Posted on by 56

Hi

If I need to add virtual field in standard data entity then I have to write code in PostLoad method.

So, to write code in PostLoad method,  I need required to create an extension of data entity like

For example:

[ExtensionOf(tableStr(SalesOrderHeaderV2Entity))]
final class Myclass_SalesOrderHeaderV2Entity_Extension
{

    public void postload()
    {
       // Custom code

         next postload();

      // Custom code

    }

}

Is it right approach?

Please Give me more shed on this

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    305,155 Super User 2026 Season 1 on at

    Hi Arpan,

    This is possible. It looks like the documentation, so give it a try: docs.microsoft.com/.../method-wrapping-coc

  • Verified answer
    Blue Wang Profile Picture
    Microsoft Employee on at

    Hi @rp@n,

    Yes, you can do it.

    [ExtensionOf(tableStr(SalesOrderHeaderV2Entity))]
    final class SWClass_SalesOrderHeaderV2Entity_Extension
    {
       
    
        public void postload()
        {
            next postload();
           
            SalesOrderHeaderV2Entity SalesOrderHeaderV2Entity = this;
           
    
            SalesTable                  salesTable = SalesTable::find(SalesOrderHeaderV2Entity.SalesOrderNumber);
    
           
            SalesOrderHeaderV2Entity.customdate  = date2Str(salesTable.createddateandtime, 213,
                                                                    DateMonth::Digits2,
                                                                    DateSeparator::Slash,
                                                                    DateDay::Digits2,
                                                                    DateSeparator::Slash,
                    DateYear::Digits4);
            }
                   
        }
    
    }

    https://rahulmsdax.blogspot.com/2019/06/how-to-extend-or-overwrite-dataentity.html

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 797

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 610 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 534

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans