VendpackingSlipJournal - Print Journal Method

hello ,

everyone

i want to trigger my own ax report not ssrs rerport exactly after posting of product receipt.

There is a method in VendPackingslipJournal - journal method.

void printJournal(PurchPackingSlipJournalPrint _purchPackingSlipJournalPrint = null,

RecordSortedList _journalList = null)

{

Args parameters = new Args();

MenuFunction purchPackingSlipMenu;

//

MenuFunction goodsReceiptNoteMenu;

#ISOCountryRegionCodes

//

purchPackingSlipMenu = new MenuFunction(menuitemOutputStr(PurchPackingSlip),MenuItemType::Output);

parameters.caller(_purchPackingSlipJournalPrint);

if (_journalList)

{

parameters.object(_journalList);

}

else

{

parameters.record(this);

}

purchPackingSlipMenu.run(parameters);

//

if(SysCountryRegionCode::isLegalEntityInCountryRegion([#isoIN])

&& _purchPackingSlipJournalPrint

&& _purchPackingSlipJournalPrint.parmPrintGRN_IN())

{

goodsReceiptNoteMenu = new MenuFunction(menuitemOutputStr(PurchGoodsReceiptNote_IN),MenuItemType::Output);

goodsReceiptNoteMenu.run(parameters);

}

//

}

How can i get input parameters for my report ???

I want vendpackingSlipJour table buffer.

plz reply

This is about AX 2009 or which version?

Ax 2012

I don’t see VendPackingSlipJournal class in my AX 2012.

oh srry its not class its table VendPackingSlipjour

VendPackingSlipJour.printJournal() is an instance method, therefore you can access the VendPackingSlipJour buffer through this variable (e.g. this.PurchId).

Also notice how parameters variable is already initialized:

if (_journalList)
{
    parameters.object(_journalList);
}
else
{
    parameters.record(this);
}

yes m agree

sir actually i want to customise product receipt print in ax 2012…

i want to print my own ax report product receipt report automatically just after posting of product receipt.There is check box in PurchEditLines Form (comes during the time of product receipt) - ‘Print Product Receipt’

if enable it triggers SSRS report.(by calling PurchPackingSlipJournalPrint Class which calls VendpackingSlipJour.PrintJournalMethod)

so i want to place my code in printJournalmethod…but i m unable to get vendpackingSlipjour buffer …

solve please

help me to solve this customization

I already told you how to access the actual VendPackingSlipJour buffer from the printJournal() method. I have nothing to add to my answer.