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

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