10 September 2022

Get object of Caller Form In Extension Class/ element to use in init extenion in D365Fo / Is it possible to get element.args() from an extended method in D365FO

Hi, in form method COC we can directly use the this instead of element.Even we can use the control names as it is.
Below is the example.

[ExtensionOf(formstr(ReqTransPO))]
final class ReqTransPOForm_Extension
{
    public void init()
    {
        next init();
        if (this.args().menuItemName() == "ReqPOGridView")
        {
            Contol.visible(false); // form control making visible false
            Control.visible(false);// form control making visible false
        }
    }

}

No comments:

Post a Comment

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.