Bojensen Blogs

Top 5 AIF Development Tips and Tricks « Greg On Dynamics Ax

1. Enable the debugger

You will notice, if you put a breakpoint into your document class, that when you run the associated action, the breakpoint will get ignored – leaving you in the dark. This is because the action is called using a ‘runas’ function call  to change the user executing the code.

To workaround this replace the runas method calls with direct calls in ClassesAifOutboundProcessingService and ClassesAifInboundProcessingService, eg:

Code Snippet
  1. /*
  2. runas(message.sourceEndpointAxUserId(),
    classnum(AifInboundProcessingService),
    staticmethodstr(AifInboundProcessingService, processAsUser),
    [message.pack(), messageId]);
  3. */
  4. AifInboundProcessingService::processAsUser([message.pack(), messageId]);

Top 5 AIF Development Tips and Tricks « Greg On Dynamics Ax

Comments are closed.