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

Display Method Data Not Showing in Query-Based SSRS Reports in D365 FO

 While working on a Query-Based SSRS Report in Dynamics 365 Finance & Operations, I faced an issue where a display method added through ...