AIF: Service actions lost after recreating service

When you delete service objects (classes, macros, service node…) and recreate the service you may have run into the issue that none of the service operations were visible.
Here’s how I solved it today when having the same issue. (We had to remove everything or else the problem was not solved)  

The problem is that the actions are not gone, but they were linked incorrectly. The AIFAction table contains the operations and also contains the classId of the class where the methods to handle the actions are.  


Well as the service objects were deleted and afterwards recreated, the class ID of the service class had been altered. Due to this changed ID, none of the operations were visible on the service.  

To fix this, just delete the current records in the AIFAction table for the corresponding service and then we can recreate the actions by calling the AIFServiceGenerationManager class,
method RegisterService.  


Then we can see the operations again in the services form.  

4 thoughts on “AIF: Service actions lost after recreating service

  1. This is a great piece of code. I have a follow up question:
    Once a company is set up in AX with a set of complex Action Policies (I’m thinking of all those myriad checkboxes), is there an easy way to copy those Action Policies over to another AX company that needs those exact same Action Policies?

Leave a Reply

Your email address will not be published. Required fields are marked *