20 February 2018

D365 or AX7 events to get current record or other database record in form

[FormDataFieldEventHandler(formDataFieldStr(InventTransRegister, TmpInventDim, inventBatchId), FormDataFieldEventType::Validating)]
public static void inventBatchId_OnValidating(FormDataObject sender, FormDataFieldEventArgs e)
{
FormDataSource tmpInventDim_ds = sender.datasource();
InventDim tmpInventDim = tmpInventDim_ds.cursor();
TmpInventTransWMS tmpInventTransWMS = tmpInventDim_ds.formRun().dataSource("TmpInventTransWMS").cursor();

Info(strFmt("Batch number %1-%2-%3",tmpInventDim.inventBatchId,tmpInventTransWMS.ItemId, tmpInventTransWMS.InventDimId));
}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...