AX2012: How to post purch packing slip if qty is different from the one on the line?

  1. My class should recieve PurchId and qty per each PO line and I need to receive this PO in X++.

But the qty on the lines is different to qty I need to post. e.g vendPackingSlipTrans records should have qty different from the one on the PO line. Therefore basically I need somehow to populate purchParmLines as pass to the purchFormLetter. Does anyone have a relevant working piece of code for AX2012?

  1. I’ve found PurchPackingSlipJournalCreate class that looks like is doing the same. Is t possible to reuse it for my purpose or it’s designed for something else?

  2. Why and when do we need to use tmpFrmVirtual table to pass the data??

Thank you