Chain of command or method wrapping in AX D365 a New Feature in Extension (PU 8 onwards)

Hi,

Chain of command or method wrapping in D365 a New Feature in Extension  (PU 8 onwards)

This new powerful extension capability in X++ in AX D365.

This Feature enables to call or use protected members and methods without making them hookable or using pre or post event handlers. 

Sample Chain of command

Standard PriceDiscAdmTrans Table's ValidateWrite() method

public class PriceDiscAdmTrans extends common
{

  public boolean validateWrite()
    {
//Standard Validations
    }
}
}

Same Standard method can be accessable at Extension Class using NEXT Keyword

[ExtensionOf(tableStr(PriceDiscAdmTrans))]
public final class MyPriceDiscAdmTrans_Extension
{
 public boolean validateWrite()
    {
            boolean ret;
            ret= next validateWrite(); // This will call Standard method validations then runs below extension code

            if (!this.FromDate)
                ret = checkfailed("From date must be filled");

            return ret;

    }
}

https://www.arbelatech.com/insights/blog/dynamics-365-finance-operations-chain-of-command-new-features.html

https://blogs.msdn.microsoft.com/mfp/2017/07/04/extensible-x-chain-of-command/

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/extensibility/method-wrapping-coc

http://www.dynamicon.de/en/2017/07/15/chain-of-commands-x-von-dynamics-365-for-finance-and-operations/

https://community.dynamics.com/ax/b/vishalsblogonmsdynamicsax/archive/2017/07/18/dynamics-365-for-operations-class-extensions-and-chain-of-command-coc-next-keyword

You need to pass extra information from your code to an existing method and act on it in a pre/post handler and You need to pass extra information from your code to a method on a class that is called via other method(s) on the class. Check below post.

https://blogs.msdn.microsoft.com/mfp/2017/08/31/extensible-x-method-signatures/

Comments


  1. احصل الان علي اقوي العروض المميزة من كود خصم سنتربوينت اي انهمي علمون علي توفير جميع الخصومات الي العملاء المميزة من كوبون سنتربوينت فهم لديهم الكثير من مميزات العاليمة منها انهم يعملون الان علي توفير افضل خصم سنتربوينت 15 العالمي

    ReplyDelete
  2. Here is the investors contact Email details,_   lfdsloans@lemeridianfds.com  Or Whatsapp +1 989-394-3740 that helped me with loan of 90,000.00 Euros to startup my business and I'm very grateful,It was really hard on me here trying to make a way as a single mother things hasn't be easy with me but with the help of Le_Meridian put smile on my face as i watch my business growing stronger and expanding as well.I know you may surprise why me putting things like this here but i really have to express my gratitude so anyone seeking for financial help or going through hardship with there business or want to startup business project can see to this and have hope of getting out of the hardship..Thank You.

    ReplyDelete
  3. I now own a business of my own with the help of Elegantloanfirm with a loan of $900,000.00 USD. at 2% rate charges, at first i taught with was all a joke until my loan request was  process under five working days and my requested funds was transfer to me. am now a proud owner of a large business with 15 staffs working under me. All thanks to the loan officer Russ Harry he is a God sent, you can contact them to improve your business on.. email-- Elegantloanfirm@hotmail.com.

    ReplyDelete

Post a Comment