D365F&O - X++ - Change form control value based on the caller form in init extension method

 1- Right click on your form and click on Create code extension.

[ExtensionOf(formStr(LedgerJournalTable))]
final class LedgerJournalTableForm_Extension
{
    void init()
    {
        next  init();
       
        if  (this.args().callerName())
        {
            if (this.args().callerName() == formStr(OrderRefundListPage))
            {
                allOpenPostedField.selection(AllOpenPosted::All);
            }
        }
    }
}

Comments

Popular posts from this blog

D365F&O - X++ - Best Practice Warning BP Rule: [BPErrorUnknownLabel]: Path:

D365F&O - X++ - How to Enable/Disable button on form based on a condition in D365F&O using Event handlers.

D365FO - X++ - Generate CAR (Customized Analysis Report) report of custom model