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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Pre and post event han...
Finance forum

Pre and post event handlers on table methods

(0) ShareShare
ReportReport
Posted on by 152

Hello All,

I have a requirement in D365 FO , where i need to move the flags on address setup parameters( Org administration->GAB->Addresses->Address  Setup -> Parameters ) to the country region level (  Org administration->GAB->Addresses->Address  Setup ->Country Region). I also need to add a Yes/No field for state level validation.

Using extensions, i was able to save the data into the respective fields from the UI. But, i need to make code changes while the address is getting validated. In the LogisticsPostalAddress table validate field method, i now do not want the standard code to execute, where the parameters from LogisticsAddressParameters table are picked. Instead, i need the values to be picked from the new fields that i added into LogisticsAddressCountryRegion. Is there any option of the standarad code not being called on validatefield using extensions? Or do i need to resort to overlayering here?

Thanks,

Swetha K Desai

I have the same question (0)
  • Suggested answer
    Mav Profile Picture
    on at

    As per latest release

    Over layering is deprecated

    You need extend the standard code using Delegates or COC(Chain of command) and then write your code in here.

    Or you can extend the standard code using the pre and post event handler

    For example if you need to modify how validation is done by standard code , you need to extend the validation code via delegates or COC or pre & post event handlers and then in the  extended code write your custom code.

    Please remember to mark it as answered if t resolved your query.

    Mav

  • swetha desai Profile Picture
    152 on at

    Hello Mav,

    Even if i use the pre and post handlers, the validatefield method on the table does execute. I do not want the standarad code in validatefield method to execute.

    Is this achievable using COC? If yes, can you please help me with some pointers to get to know more about it please

    Thanks,

    Swetha K Desai

  • Suggested answer
    Mav Profile Picture
    on at

    Swetha  do some self research on bing.

    If my understanding is right than you want to customize the existing validate method on table, if that be the case then you should go with overiding the validate method .

    For coc you may refer to link below

    shyamkannadasan.blogspot.com/.../chain-of-command-at-ax-d365-new-feature.html

  • Suggested answer
    @365 Profile Picture
    15 on at

    Use Extensibility: Replaceable in Chain of Command methods

    The [Replaceable],  Standard code will be replaced with customized code

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans