Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

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;
}

Company image in SSRS 2012

1. Create a field as Companyimg in the temp table
2. In the properties of that field select the extended datatypes as "Bitmap".
 use the below code to insert
TmpTbl.Comapanyimg = CompanyImage::findByRecord(CompanyInfo::find()).Image;
3. In Visual studio  right click insert image .
a. Source : database
b. field select the companyimg
c. as bitmap format in format selection

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...