Alfasith AX

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

Thursday, February 15, 2018

Code to clear the cache value / Last used values in SSRS through controller class in AX 2012

Hi,


public static void main(Args _args)
{
    SrsReportRunController controller  = DASPaymentVoucherController::construct();
    controller.parmArgs(_args);
    switch(_args.menuItemName())
    {
        case menuitemOutputStr(DASReceiptVoucherReport):
        controller.parmReportName(ssrsReportStr(DASPaymentVoucher, ReceiptReport));
        break;
        case menuitemOutputStr(DASPaymentVoucherReport):
        controller.parmReportName(ssrsReportStr(DASPaymentVoucher, Report));
        break;
        case menuitemOutputStr(DASPettyCashVoucherReport):
        controller.parmReportName(ssrsReportStr(DASPaymentVoucher, PettyCashReport));
        break;
    }

    controller.parmShowDialog(true);
    controller.parmLoadFromSysLastValue(false);
    controller.startOperation();
}

Thanks,

Wednesday, February 14, 2018

Get the values from ProjProposalTotal forms in AX 2012

Hi,

static void Job83(Args _args)
{
  ProjProposalTotals      ProjProposalTotals;
    container               taxCal;
    AmountCur               taxAmount;
        ProjProposalJour projProposalJour = ProjProposalJour::find('PROP-0019');

        ProjProposalTotals  = new  ProjProposalTotals(projProposalJour);
        ProjProposalTotals.calc();
taxCal = ProjProposalTotals::displayFieldsServer(projProposalJour.RecId);
        taxAmount = conPeek(taxCal, ProjProposalTotals::posSumTax());
   
        InvoiceAmount  = projProposalJour.InvoiceAmount - taxAmount;
        TaxAmount       = taxAmount;
        CurrencyCode   = projProposalJour.CurrencyId;
        Amountstr   = Global::numeralsToTxt_UAE(projProposalJour.InvoiceAmount);
}

Regards,

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...