Question Status

Ravindra Kesharwani asked a question on 9 Nov 2011 9:31 PM

what is use of Classfactory , MapEnumerator and RunBase Class

MBEU responded on 13 Nov 2011 2:44 PM

ClassFactory is a system class which is loaded every time AX is started so it should be modified with care. It can also be used to create class instances at run time for example:

args = new Args(formstr(CustTableLookup));
formRun = classfactory.formRunClass(args);
this.performFormLookup(formRun, _formControl);

MapEnumerator is used to traverse a map which is a list of value pairs. For example it can be used as follows:

mapEnumerator = yourMap.getEnumerator();

while (mapEnumerator moveNext())
    info(strfmt("Key: %1, Value: %2", mapEnumerator.currentKey(), mapEnumerator.currentValue()));

Runbase class is the base class in the RunbaseFramework. If you want to create a class to run within the Runbase Framework it must extend from this class. The standard documentation and the class "tuorial_RunbaseBatch/Form/Report" give sufficient information about its use.

Hope this helps.