Sunday, 20 February 2022

OnInitialized FormEventHandler in D365 F&O

 class DDDInventJournalNameFormEventHandler

{

    [FormEventHandler(formStr(InventJournalName), FormEventType::Initialized),

    SuppressBPWarning('BPParameterNotUsed', 'False positive')]

    public static void InventJournalName_OnInitialized(xFormRun sender, FormEventArgs e)

    {

        FormRun       element = sender;

        FormControl   processBudget = element.design(0).controlName(formControlStr(inventJournalName, DDDBudget_DDDProcessBudget));

        FormControl   defaultGeneralJournal = element.design(0).controlName(formControlStr(inventJournalName, DDDBudget_DDDDefaultGeneralJournal));

        

        processBudget.visible(false);

        defaultGeneralJournal.visible(false);

    }

}

No comments:

Post a Comment

Setting VendInvoiceInfoTable default values for custom fields - D365 FO

  When creating a vendor invoice and you are trying to populate custom fields on table VendInvoiceInfoTable you may find that the following ...