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

Service class to get the selected record and deleted matching records and refresh the form data source in D365 F&O

 [DataContractAttribute] class ABCUserProfilesBulkDeleteContract {         UserId userId;     [DataMemberAttribute('UserId')]     pu...