mfp

X++ Chain Of Command

Play X++ Chain Of Command

The Discussion

  • User profile image
    Fahad

    Its definitely a great feature. Any chance this would be available for more AOT artifacts like Tables?

  • User profile image
    Praveen Kumar Boyapati

    Hi MFP,

    Good day..!

    We can access global protected varaibles like journal in your example. if i added one local variable in calcAmount() method like below

    protected amount calcAmount(JournalType _journalType)
    {
    Amount amt = 25;
    return 42 ;
    }
    How can we access amt local varaible in the extended class ?

    Thanks,
    Praveen

  • User profile image
    murilo33

    very goodyour video congratulations for the quality content

  • User profile image
    avp

    Thanks really good video . Please post more videos for D365 FO.

  • User profile image
    sammt

    what's the difference with super()?

  • User profile image
    Gras

    Works fine mate, however, I'm looking to use chain of command on a syswizard, for the next method, because I want to add extra validation to what already exists in the next method for this syswizard...

    So in my final extension class, where COC works beautifully on Validate, I'm trying to do the same on next, which is also the COC keyword...
    [ExtensionOf(classStr(VendProspectiveVendorRegistrationWizard))]
    final class MyWizard_Extension
    {
    boolean validate()
    {
    boolean res = next Validate();
    return this.formRun().MyExtraValidation() && res;
    }

    void next()
    {
    next next();
    this.formRun().MyExtraValidation();
    }
    }

    The second method generates 2 compiler errors on 10.0.9 U33:
    void next() => Chain of command method must contain one next call.
    next next(); => Invalid token 'next'

    The temporary fix that I use is to use the next's post event handler instead of COC...

    Ta

Add Your 2 Cents