Adding custom business logic in AIF classes

Hi, This query is regarding AIF where I import data from an xml file in Ax 12 using file system adapter. I have a custom table say MetroTable with 4 fields <ID(pk),Name,Date,Remarks>. I have created query, AIF classes (Service class, Axd class, AXBC class) and configured the inbound port. I can successfully import data from xml file in Ax using “Create” service operation and response xml file also gets created afterwards. All these runs in AIF batch job or can be run directly.
Now, during my import, I wanted to assign a field value of “Remarks” or want to manipulate other values. I tried writing few code in Axd class in prepareForSaveExtended() method or prepareForSave() method, but nothing happens. I also did some modification in AXBC class in the method setTableFields(), initRecords(), but again nothing changes after import. It only imports the data as specified in the xml file.

I tried to debug as well, but the break point never activate in those classes. Looks like, those classes never called during data imort from xml. I know I am going wrong somewhere :frowning:

Basically, what I am looking for, I want to do some insert/update in other tables or objects or defaulting some table fields value based on what I am importing from xml file using AIF file system adapter.

Please help to comprehend me this. Thank you.

Hi dip,

I have very similar requirement. Did you find the solution for this? It would be really helpful to me if you can post the solution or the work around for this if you were able to find one.

I need to know where to write some code to update data during import.

Thanks in advance.


To debug AIF, change the code as mentioned in the below URL and set break point there -

If possible, I would highly recommend a training course on AIF