07 June 2018

How to get user input value in Controller class in AX 2012 D365


How to get user input value in Controller class in AX 2012 D365
How to get contract value and based on the user value condition run report design

class TestController extends SrsReportRunController
{
public static void main(Args _args)
{
TestController controller = new TestController();
controller.parmReportName(ssrsReportStr(StatementMan, report));
controller.parmArgs(_args);
controller.startOperation();
}

///
///
///

protected void preRunModifyContract()
{
TestStmtContract contract = this.parmReportContract().parmRdpContract() as TestStmtContract;
this.parmReportContract().parmReportName(this.getReportName(contract));
super();
}

private str getReportName(TestStmtContract _contract)
{
str reportNameLocal;

if (_contract.parmNoTrans()) // this is the user input value
{
reportNameLocal = ssrsReportStr(StatementMan, report1);
}
else
{
reportNameLocal = ssrsReportStr(StatementMan, report);
}

return reportNameLocal;
}

}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...