Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Event Handler Doesn't get Parameter

Posted on by 555

Dear All,

I have an issue on my code

My event handler doesn't get parameter

Here is my code and variable on debugger

event-handler-doesnt-get-parameter.png

I add the event handler on update method

event-handler.png

I just full compile and full cil but didn't solve the issue

Please kindly give me an advice and solution

Thanks in advance

Best Regards,

Bintang

*This post is locked for comments

  • Bintang Profile Picture
    Bintang 555 on at
    RE: Event Handler Doesn't get Parameter

    Dear All,

    Issue solved by clear XPPIL file then full compile and generate full CIL

    Thank for all your support

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: Event Handler Doesn't get Parameter

    Hi,

    Have you changed this property from called from to server or client ?

    Have you tested after changing it to called from.

    /Uday.

  • Bintang Profile Picture
    Bintang 555 on at
    RE: Event Handler Doesn't get Parameter

    Hi udhayachandranr,

    I set it to Called from

    called-from.png

    Any other suggestion?

    Thanks in advance

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: Event Handler Doesn't get Parameter

    What is the run on property set on your eventHandler class (VDI_PurchTableEventHandler) ?. By default, this should be called from.

    If it something else other than 'Called from' Try setting it to 'Called from'  and give a try.

  • Bintang Profile Picture
    Bintang 555 on at
    RE: Event Handler Doesn't get Parameter

    Dear Nikolaos Mäenpää ,

    It's the same , last time I changed Language on Header View Purchase Order but still doesn't get PurchTable as a parameter from _args

    On the other process , I have update_recordset to PurchTable too

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Event Handler Doesn't get Parameter

    Based on the call stack you are updating purchase line in the user interface, not purchase table. Does your event handler work if you actually change the values of purchase order header and save?

  • Bintang Profile Picture
    Bintang 555 on at
    RE: Event Handler Doesn't get Parameter

    Dear Nikolaos Mäenpää,

    Here is the call stack on debugger

    event-handler-doesnt-get-parameter-6.png

    Customization on update method just declaration variable

    event-handler-doesnt-get-parameter-6.png

  • Bintang Profile Picture
    Bintang 555 on at
    RE: Event Handler Doesn't get Parameter

    Dear Martin Dráb,

    Do you have any suggestion?

    It's my first time using event handler

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Event Handler Doesn't get Parameter

    Bintang, could you share the call stack for the PurchTable event handlers?

    Also do you have any customization in the PurchTable/update method itself?

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Event Handler Doesn't get Parameter

    It works fine in my environment.

    A side note: your catch statement won't work if update() is called in a transaction.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans