I am working on a batch job having class SubledgerJournalTransferController which extends SysOperationServiceController. I follow the following article for guidance https://dynamicsaxinsight.wordpress.com/2015/04/24/ax-2012-customize-controller-for-batch-job/ . When I am opening the action menu item I am getting the following error
"SubledgerJournalTransferRequest object not initialised".
Stack trace
(C)\Classes\SubledgerJournalTransferController\main - line 14
and this is my main method.
public static void main(Args args)
{
SubledgerJournalTransferController controller;
SubledgerJournalTransferRequest dataContract;
identifierName className;
identifierName methodName;
SysOperationExecutionMode executionMode;
[className, methodName, executionMode] = SysOperationServiceController::parseServiceInfo(args);
controller = new SubledgerJournalTransferController(className, methodName, executionMode);
// Initialize data contract and set default ledger to current
dataContract = controller.getDataContractObject(classStr(SubledgerJournalTransferRequest));
dataContract.parmledgerId(Ledger::current());
if (controller.prompt())
{
controller.run();
}
}
//Note: The line in red is 14th line.
Please guide.