Posts

Showing posts with the label DocuView caller

What is the parmLastActivatedForm method used for in Dynamics AX?

Image
Hello readers, In my earlier post, we had seen how to get all of a form's callers in Dynamics AX . One of my readers brought up a very good and interesting question around this. Some action forms opened like the Document handling form will not show the caller. Is there a way to find the caller for these forms? This is indeed correct. If you open the document handling form from any form, and look for the caller name, it will be empty. See the below image to understand what I mean. Well, this shouldn't stop us Dynamics AX developers from getting our way. In this post we will learn how to get the caller in such scenarios. The answer lies in a method in the Info class - parmLastActivatedForm() Basically, the parmLastActivatedForm() method returns the last form that was activated. So let us see all this in action. My code is in Dynamics AX 2012, but you can easily apply it in Dynamics AX 2009 as well. Let us modify the init() method of the DocuView form. This is...