The purpose of this blog is for knowledge sharing and connect the relevant audience who are all into Microsoft Dynamics world.
Alfasith AX
Friday, August 30, 2013
Wednesday, August 28, 2013
Job to run the DP class in Dynamic AX
static void Job2runDP(Args _args)
{
TenantBalanceDetailsTmpTbl TenantBalanceDetailsTmpTbl; //temp table name
Query q;
TenantBalanceBuildingLevRDP dataProvider = new TenantBalanceBuildingLevRDP();
//DP class name
TenantBalanceBuildingLevContract contract = new TenantBalanceBuildingLevContract();
//contract class name
contract.parmNetBuildingId('CEU-000022');
//parameter that you passing in contract class
q = dataProvider.parmQuery();
dataProvider.parmDataContract(contract);
dataProvider.processReport();
TenantBalanceDetailsTmpTbl = dataProvider.getTenantBalanceDetailsTmpTbl();
while select TenantBalanceDetailsTmpTbl group by buildingId
{
print(TenantBalanceDetailsTmpTbl.BuildingId);
//Just print the filed that you want see the output
print(TenantBalanceDetailsTmpTbl.TotalCredit);
print(TenantBalanceDetailsTmpTbl.TotalDebit);
print(TenantBalanceDetailsTmpTbl.BalanceCredit);
print(TenantBalanceDetailsTmpTbl.BalanceDebit);
}
pause;
}
{
TenantBalanceDetailsTmpTbl TenantBalanceDetailsTmpTbl; //temp table name
Query q;
TenantBalanceBuildingLevRDP dataProvider = new TenantBalanceBuildingLevRDP();
//DP class name
TenantBalanceBuildingLevContract contract = new TenantBalanceBuildingLevContract();
//contract class name
contract.parmNetBuildingId('CEU-000022');
//parameter that you passing in contract class
q = dataProvider.parmQuery();
dataProvider.parmDataContract(contract);
dataProvider.processReport();
TenantBalanceDetailsTmpTbl = dataProvider.getTenantBalanceDetailsTmpTbl();
while select TenantBalanceDetailsTmpTbl group by buildingId
{
print(TenantBalanceDetailsTmpTbl.BuildingId);
//Just print the filed that you want see the output
print(TenantBalanceDetailsTmpTbl.TotalCredit);
print(TenantBalanceDetailsTmpTbl.TotalDebit);
print(TenantBalanceDetailsTmpTbl.BalanceCredit);
print(TenantBalanceDetailsTmpTbl.BalanceDebit);
}
pause;
}
Subscribe to:
Posts (Atom)
How find size of recordsortedlist in D365/AX 2012
Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...
-
Hi, AccountingDistribution ( accounting distribution 7452 ) AccountingDistributionEventTmp ( accounting distribution 100001 ) Accountin...
-
Hi, Create a EDT name it Gender then in properties enumType : //select the enum name Use the below code and enjoy. static v...