Pass arguments from class run on server side

Hi All,

I have created a class, say ‘testClass’ which is run on server side. I have created a form, say ‘TraceSerial’. when we execute ‘testClass’, it takes serial number as input and it traces serial number and inserts record into the database. The records are inserted using RecordSortedList. After inserting the records, ‘TraceSerial’ form is opened through code. I’m passing args to ‘TraceSerial’ form. But when args is passed, Ax is getting restarted. ‘TraceSerial’ form opens fine when no args is passed. The form is opened using the following code.

new menufunction(menuitemdisplaystr(CNLUSDiversionTrackingOutput), MenuItemType::Display).run(args);

A string variable is passed as args. I’m not understanding, what is the issue with passing the args. Please help.

Regards.

Raghav.