DataEventType::MappedEntityToDataSource in D365
[DataEventHandler(tableStr(MyTableEntity), DataEventType::MappedEntityToDataSource)]
public static void MyTableEntity_onMappedEntityToDataSource(Common _sender, DataEventArgs _eventArgs)
{
DataEntityContextEventArgs eventArgs = _eventArgs;
MyTableEntity entity = _sender;
if (eventArgs.parmEntityDataSourceContext().name() == dataEntityDataSourceStr(MyTableEntity, MyTable))
{
MyTable myTable = eventArgs.parmEntityDataSourceContext().getBuffer();
... write your logic here
}
}
Thanks,
Vikas Mehta.
No comments:
Post a Comment