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++ - Create and post Customer payment Journal using X++ code.

D365F&O - X++ - Set contract parameter value in controller class of SysOperationServiceBase framework

D365F&O - X++ - Create Batch job using SysOperationServiceBase in X++