Sunday, December 14, 2014

Calling Events of AX Form's Datasource

While working on AX 2012 Forms, we need to call form's datasource events every now and then from other events. Below is the example that shows how you can call any event like modified, validate etc. of a form's datasource from any other method.

Below example shows how you can call modified method of ItemId field under InventJournalTrans datasource.

FormDataObject          itemIdField;
itemIdField = inventjournalTrans_ds.object(fieldnum(InventJournalTrans, ItemId));