This Blog consists of D365 code level and front D365 hacks used in normal daily routine tasks:
- To initialize C# list in D365 FO:
CLRObject NoteList = new System.Collections.Generic.List<Note>();
- FormDataSource objects initialization:
VSD_LedgerJournalTransDailyCS_EventHandler handler = new VSD_LedgerJournalTransDailyCS_EventHandler();
formRun = sender.formRun();
ledgerJournalTrans_ds = formRun.dataSource(formDataSourceStr(LedgerJournalTransDaily, LedgerJournalTrans)) as FormDataSource;
ledgerJournalTrans = ledgerJournalTrans_ds.cursor();
ledgerJournalTable = ledgerJournalTrans.ledgerJournalTable();
handler.lookupBasedOnJournalControl(sender, ledgerJournalTable.JournalName, ledgerJournalTrans.Company);
FormDataSource custInvoiceTrans_ds = formRun.dataSource(formDataSourceStr(SalesCopying, CustInvoiceTrans)) as FormDataSource;
FormDataSource custInvoiceJour_ds = formRun.dataSource(formDataSourceStr(SalesCopying, CustInvoiceJour)) as FormDataSource;
FormControl CheckBox = formRun.design().controlName(formControlStr(SalesCopying, CustInvoiceTrans_Copy));
- Cancel parent event lookup or standard lookup using event handlers:
FormControlCancelableSuperEventArgs event = e as FormControlCancelableSuperEventArgs;
event.CancelSuperCall();
Comments
Post a Comment