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 :
Microsoft Dynamics AX (Archived)

Extension in D365 Ax7

(0) ShareShare
ReportReport
Posted on by

Hi All,

     I need to take extension for class declaration in form method , i cant take post are pre event handler method for this class declaration In Dynamics 365  .Please suggest an solution.

Thanks & regards,

padmapriya

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    Hi Padma varatharajan 123,

    You can add new form variable using form extension docs.microsoft.com/.../method-wrapping-coc

    Just create a new class with ExtensionOf(formStr(MyForm))] attribute, where MyForm is name of the form you want to extend.

    Another example https://community.dynamics.com/ax/b/newdynamicsax/archive/2016/10/11/code-behind-extension-forms-how-to-add-state-variable-and-override-methods-without-overlayering

  • Community Member Profile Picture
    on at

    Hi Ievgen,

             I tried this way but this is the form class declaration, shown below

    1565.classdeclaration.png

    But i am facing the error like, Invalid token class then what shall i need to use.

    Thanks & Regards,

    padmapriya

           

  • Verified answer
    Satish kakileti Profile Picture
    185 on at

    Hi Padma,

    Hope this helps,

    [ExtensionOf(formstr(LogisticsPostalAddress))]

    final class LogisticsPostalAddress_Extension

    {

    <Delare your variable directly here with Access specifier PUBLIC>

    Ex: Public InventLocationId wareHouse;

    }

    Thanks & regards,

    Satish Kakileti.

  • Mea_ Profile Picture
    60,286 on at

    Please follow Satish's example, you dont need to declare class inside of the class, its not inharitance , its something different called chain of command

  • Community Member Profile Picture
    on at

    Hi satish,

              Thank you i used your way of declaration.it works.

    Thanks & reards,

    padmapriya

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans