I have a customer-sync built that syncs AX customers with an external system's customers.
When an update/insert is performed on the external system, it dumps an AIF file that gets processed.
I want to put some logic in the table method CustTable.insert()
and CustTable.update()
so that when anything is inserted/updated it will push up the the external system, which works fine.
The problem is when a user makes a change in the external system, it makes the AIF file, which then inserts/updates in AX, then pushes a change back up to the external system.
How can I determine when a custTable insert/update is being performed from an AIF process? Pseudo code I'm looking for would be like this in the Tables\CustTable\Methods\insert()
:
// Pseudo code
if (this.isFromAIF() == false)
{
this.syncRecordToExternalSystem();
}