28 Jan 2015

Pass parameters between class and report +AX

Suppose that you have a RunBase class that call for a report .
You can use methods and parameters from this class into your report.
then in the init method of your report use this :

public void init()
{
// NoYes test;
super();
myCaller = this.args().caller();

if (myCaller)
{
if (myCaller.parmPayrollJobTable())
{
if(!myCaller.parmPayrollJobTable().PayrollClosed)
{
//BP Deviation Documented
payslipJour.setTmp();
//BP Deviation Documented
payslipTrans.setTmp();
payslipJour.setTmpData(myCaller.parmTmpPayslipJour());
payslipTrans.setTmpData(myCaller.parmTmpPayslipTrans());
thisEmplQueryRun = new QueryRun(myCaller.queryRun().query());
}
emplSet = myCaller.parmEmplSet();
}
}
else
{
throw error("@PAY3089");
}
}

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...