Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

Piece of code need to convert from ax 2009 to ax 2012

$
0
0

Hi Every one,

I have a piece of code wrote in ax 2009

Can anyone help me write the same in AX 2012

Code wrote in SalesPackingSlipJournalCreate in Ax 2009

    packingSlipVoucher = SalesParameters::numRefSalesPackingSlipVoucher().NumberSequence;
    packingSlipNumber = inventLocation::find(this.packingSlipWareHouse()).AllePackingSlipNum;
    if(packingSlipNumber)
    {
        return NumberSeq::newGetNumAndVoucherFromCode(packingSlipNumber,packingSlipVoucher);
    }
    else
    {
        return NumberSeq::newGetNumAndVoucher(SalesParameters::numRefPackingSlipId(),
                                  SalesParameters::numRefSalesPackingSlipVoucher());
    }

New method developer created

InventLocationId packingSlipWareHouse()
{
    SalesParmLine       salesParmLineLocal;

;
    select salesParmLineLocal
        where salesParmLineLocal.ParmId ==this.parmId();

    return salesParmLineLocal.inventDim().InventLocationId;
}

Help me to convert it into Ax2012

Thanks&Regards

Raghu


Viewing all articles
Browse latest Browse all 9880

Trending Articles