In AX 2009 after restoring the production server over the development one I found that none of my custom AIF services were working. Curious, after having compiled and synchronised all. Also more frustrating as the base AX AIF services that I have subsequently modified actually seem to work.
The first place to go was to change the web site that actually publishes the AIF beast and update those root values... And don't forget to Validate that it works.
Base > Configuration > AIF > Web Sites |
Updating and regenerating our services all appeared to go well... But wait. No service operations?
Base > Configuration > AIF > Services |
We can find an error message, finally. by passing down the Extreme end point > Action directive methods.
An error message is generated moving down the list |
Open up the message into the dev environment, and remember that the breakpoint is our friend here..
The class method for the specified action '%1' could not be found. |
Looking directly in to the AifService and AifAction table (shared across companies), the DirContacPersonsService classId equated between the value in the table and the id of the class while my own classes did not have corresponding values with those of the table. There was a difference for my custom classes!
Updating ClassId 30073 to 30226 in tables: AifService & AIFAction |
UPDATE [DynamicsAxDEV].[dbo].[AIFACTION]
SET [CLASSID] = 30226
WHERE [ACTIONID] IN ( 'HIECustNameService.find', 'HIECustNameService.read')
GO
...And the result feels great! |
There are more steps however as the above 'CustomerName' service is one that is used across all companies, using a virtual company.
Cannot find the schema parameter. |
Identify the matching class from the source environment and update directly in SQL if you're already on your third whisky. It'll all turn out okay in the end!
UPDATE [DynamicsAxDEV].[dbo].[AIFENDPOINTACTIONPARAMETER2257]
SET DOCUMENTCLASSID = 30245
WHERE DOCUMENTCLASSID = 30123
Finally, avoid having to manually regenerate the fields published by the action directives by updating the AIFDataPolicy table.... There MAY be differences between the custom table field ids as well of course and it'll be inevitable to update these things by hand.
UPDATE [DynamicsAxDEV].[dbo].[AIFDATAPOLICY]
SET DOCUMENTCLASSID = 30245
WHERE DOCUMENTCLASSID = 30123
GO