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

DefaultDimension in d365 FO X++

 Navigate to PurchTable methods you can find with DefaultDimension this.DefaultDimension = this.mergeDimension(this.getDefaultDimension(),th...