D365F&O - X++ - create modified method coc of form control in form extension
1- Right click on form and click "create extension".
[ExtensionOf(formControlStr(CustFreeInvoice, OrderAccount))]
final class CustFreeInvoiceOrderAccount_Extension
{
public boolean modified()
{
Boolean ret = next modified();
FormDataSource custInvoiceTable_ds = this.formRun().dataSource(tableStr(CustInvoiceTable));
custInvoiceTable custInvoiceTable = custInvoiceTable_ds.cursor();
if (CustInvoiceTable.RecId == 0)
{
CustInvoiceTable.write();
}
custInvoiceTable_ds.research(true);
return ret;
}
}
Comments
Post a Comment