Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

How I will call or add new method or events in Standard objects in D365FO

Posted on by 5,901

Dear All,

Can you please let me know

A). I will add METHODS

1. New method in Standard Table.

2. New method in Standard Form 

3. New method in Standard Form DS

4. New method in Standard Form Control.

B). How I will call EVENTS in Standard(Table, Form, Form DS, Form Control) ? 

Example

Form > SalesTable > Event > OnActivated

Form > DS > SalesTable > OnCreated

Form Control > SalesTable_SalesTypeGrid > Event > OnValidating

Table > LedgerJournalTable > Event > OnDeleting

How I will call the above events from Standard Objects ?

Please give me more shed on this.

Thanks!

*This post is locked for comments

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    Thanks Sukrut

    If u wants to add some validation in OnInserting

    Ist possible?

    Thanks!

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    Thanks Nikoloas and Sukrut

    So, I can't add directly new method on Form DS OR Form control as well.

    In Section B I mentioned above how I will call Events in Standard Form, Table , Form DS and Form control ?

    Can you please send me the sample  code.

    Thanks!

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    1 and 2 should be possible with PU 20 which has just been released. At least you can use CoC on form ds methods and control methods. So I would guess you can also add methods.

    I haven't yet seen documentation on how exactly to use it (syntax). Maybe you can try it and share the results with us?

    docs.microsoft.com/.../whats-new-platform-update-20

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    Hi All,

    Still I have doubt in below points

    1. How i will add New method in Standard Form DS

    2. How i will add New method in Standard Form Control.

    Through below code I can call directly Table OR Form OR Class

    [ExtensionOf(classStr(MyClass))]

    final class MyClass_Extension

    {

       // method  

       private void new()

       {

       }

    }

    Please give me more she'd on this.

    Thanks!

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    Thanks Nikoloas,

    Sure,I will go through the documents or link.

    I am asking because in my mind some questions are raising. I am new to D365FO

    Any way, Thanks!

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    Please read the documentation and try for yourself. With these two methods you will learn so much more about these D365FO development fundamentals.

    If you can't find answer in the documentation and your code has issues, then ask from others.

    I'm saying this because you seem to be asking so many questions about things that you could find in one minute from the documentation or by experimenting.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: How I will call or add new method or events in Standard objects in D365FO

    Thanks Martin,

    You mean to say find(), display() Or any new method correct?

    Please give me more shed on this.

    Thanks!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans