Sunday, 20 February 2022

OnActivated FormEventHandler in D365 F&O

class DDDInventJournalCreateFormEventHandler

{

    [FormDataSourceEventHandler(formDataSourceStr(InventJournalCreate, InventJournalTable), FormDataSourceEventType::Activated),  SuppressBPWarning('BPParameterNotUsed', 'False positive')]

    public static void InventJournalTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)

    {

        InventJournalTable   inventJournalTable   = sender.cursor();

        sender.formRun().design().controlName(formControlStr(InventJournalCreate, DDDTabFinancialDimensions)).visible(InventJournalName::find(inventJournalTable.JournalNameId).DDDBudget == NoYes::Yes);

    }

}



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...