web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

SubledgerJournalTransferRequest object not initialised.

(0) ShareShare
ReportReport
Posted on by 185

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.

I have the same question (0)
  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Bilal,

    You can initialize the contract first in prePromptModifyContract().

    contract = this.parmReportContract().parmRdpContract() as SubledgerJournalTransferRequest;

    You use 

    dataContract.parmledgerId(Ledger::current()); 

    The error may be because it is null.

    In your DP class, whether to use SRSReportParameterAttribute to correctly point to your contract class(SubledgerJournalTransferRequest).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 733

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 278 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans