How long have you been using Microsoft Dynamics Ax?

Toplam Sayfa Görüntüleme Sayısı

Popular Posts

Translate

Bu Blogda Ara

25 Aralık 2012 Salı

Calling methods on a caller form


Hi All,

When we call object from form and on this object we need a method from caller form use identifierStr and formHasMethod functions.

Code example below describes how to call caller objects methodName named method from called object.

To check caller has the method just call formHasMethod with caller object and name of the method parameters.

If returns true you can assign caller object to Object type variable and simply add the method name.



Object                  formRunObject;

if (args.caller() && formHasMethod(args.caller(), identifierstr(methodName)))
 {
        formRunObject = args.caller();

        formRunObject.methodName();  

}

Happy AXing.
Alper.

Hiç yorum yok:

Yorum Gönder