AX2012 FP Product receipt from X++

Here the other day I have seen a change in functionallity between AX 2012 (6.0) and AX 2012 Feature Pack (6.1).  At several customers we are using simplified product receipt, where the warehouse worker and do a product receipt from a small PDA screen, after the items has been registrered :


A small demo X++ code for doing the product receipt is like this (for AX 2009 and AX 2012):


11 thoughts on “AX2012 FP Product receipt from X++

  1. Hi Kurt
    Thank you for your valuable post,
    I am trying to create product receipt by code, and used the following sample code:

    My PO contains 2 lines, I created product receipt by the code and the PO status is received now.
    I received 1 just one item.

    I want to invoice the PO based on the created product receipt “PR-1234”

    can you please help me,

    Thanks and Best Regards,

    static void PurchRec(Args _args)
    PurchFormLetter_PackingSlip purchProductReceipt;
    PurchTable purchTbl;
    PurchId purchid;
    PurchLine purchline;
    // let’s say, product receipt is for PO: ‘ PO-000242’
    purchid = “PO-000242″;
    purchTbl = PurchTable::find(purchid);
    // initiate PurchFormLetter_PackingSlip class
    purchProductReceipt = PurchFormLetter::construct(DocumentStatus::PackingSlip);
    select forUpdate purchLine
    where purchLine.PurchId == purchTbl.PurchId
    && purchLine.IsDeleted == NoYes::No;
    && purchLine.itemid == “0001”

    purchLine.PurchReceivedNow = 32;
    purchLine.InventReceivedNow = 32;
    purchProductReceipt.update(purchTbl,”PR-1234”, today(), PurchUpdate::ReceiveNow, AccountOrder::None, false, false);

    Liked by 1 person

      • Hi Kurt,
        Thanks for your reply, all articles I found are related to AX 2009,

        Can you please suggest the solution for AX 2012,

        Thanks in advance,


  2. Hi Kurt
    I like your receive screens. Actually I think the company I am currently working is using your AX bartender solution. Anyway, I have about 4 months AX development experience working in AX, so its a bit slow getting up to speed. I have created a screen similar to what you have to receive product and create arrival journal and post it (via X++). Next step I need to do is to post product receipt via X++. Looking at your code example how is the journal itself related to the posting of the receipt? I guess this already happens because the journal itself already referenced the specific purchase order and then the posting of the receipt also references the same purchase order? any thoughts would be helpful. I am only trying to post product receipt against purchase orders and maybe transfer orders (if possible). Basically need the same functionality you get from the arrival journal screen and clicking on “functions — product receipt”.


    • Hi Rick.

      The following code is Packingslip/Receipt updating a purchase order of what is registered.

      public boolean postProductReceiptList()
          boolean ret;
          PurchFormLetter_PackingSlip purchFormLetter_PackingSlip;

          purchFormLetter_PackingSlip = PurchFormLetter::construct(DocumentStatus::PackingSlip);
          ret = true;

          return ret;
      If you are using arrival journal, then the following code is the core source >
      public boolean postJournal()
          boolean ret = true;
          WMSJournalCheckPostReception wmsJournalCheckPostReception;
          PurchFormLetter_PackingSlip  purchFormLetter_PackingSlip;
          InventTransferParmTable      inventTransferParmTable;
          WMSJournalTrans              wmsJournalTrans;
          InventTransferUpdReceive     inventTransferUpdReceive;
         // SalesFormLetter_PackingSlip  salesFormLetter_PackingSlip;
              if (this.wmsJournalTable().Posted == NoYes::No)
                  wmsJournalCheckPostReception = WMSJournalCheckPostReception::newTypeJournalTable(JournalCheckPostType::Post, this.wmsJournalTable());
              switch (this.wmsJournalTable().InventTransType)
                  case InventTransType::Purch:
                      purchFormLetter_PackingSlip = PurchFormLetter::construct(DocumentStatus::PackingSlip);
                  case InventTransType::TransferOrderReceive:
                      while select wmsJournalTrans
                              group by InventTransRefId
                          where   wmsJournalTrans.JournalId == this.wmsJournalTable().JournalId
                              &&  wmsJournalTrans.InventTransType == InventTransType::TransferOrderReceive
                      inventTransferParmTable.TransferId = wmsJournalTrans.InventTransRefId;
                      inventTransferParmTable.EditLines = true;
                      inventTransferParmTable.AutoReceiveQty = true;
                      inventTransferParmTable.UpdateType = InventTransferUpdateType::Receive;
                      inventTransferParmTable.ReceiveUpdateQty = InventTransferReceiveUpdateQty::Registered;
                      inventTransferParmTable.TransDate = systemDateGet();
                      inventTransferUpdReceive = InventTransferUpdReceive::newParmBuffer(inventTransferParmTable);
                  case InventTransType::Sales:
                      //Not implemented

          return ret;

      Let me know if it helps.  And PS!  super thx for using the barTender solution.  I hope your company also could look into the PDA solution.  It is from this solution that I have copied the code.


      • For the arrival journal part, we had to populate a ParmTable as well.

        Added a call to purchFormLetter_PackingSlip.parmLineList(list.pack()); as it’s done in the PurchFormLetter.main() method.

        Hope this helps!


  3. Kurt, Im looking to receive barcoded Fixed Assets at time of receipt. I cannot find this within AX 2012. Could you point me in the right direction? Then maybe i can get into some customizations from there…



    • I’m not quite sure of your requirements, but the Purchase module in AX 2012 is built for also purchasing fixed Assets. In the PO you can also select the bar-code that is expected. If the bar-code is a EAN128 you can use this barcode in the arrival journal, bu scanning on the EAN128 field. But there are functional limitations on this, so you very quickly end up with a customization.

      But take a look on the PDA and BarTender integration tools that I have described in my blogs. They do support to just scan to bar-codes to receive the goods, and the PDA does also support receive of Fixed Assets if using purchase orders. If interested in more information, I can send you the user manuals, or reach out to me to a chat.


  4. Hi Kurt,

    I am a follower of your blogs and read them regularly and likes them very much.

    I will like to take some help from your side here.

    There is a requirement to implement Bar Code solution for one of the customer. What do you suggest which will be a better solution ( 3rd party PDA solution or customizing Ax only). We are using Ax2009 version with medium to heavy customizations.

    We require the Bar code solution at the following places
    – Receipt,Picking, Packing, Packaging, Bill of Lading journal, Transfers.

    I have another question.
    1) In case we use the customization activities in Ax only , then how can be access Ax application through PDA devices. What will be the most optimum ways to access Ax 2009 application from PDA devices. Are there any implications from licensing side also here.

    2) What kind of PDA devices are recommened for warehousing solution.

    Thank you very much,



    • Hi Naresh.

      Thank you for reading my blog 🙂 There are many other solutions in the marked that covers both barcoding and PDA. This is like Dynamics anyware, RF-smart or To-Increase. The solutions I’m writing on is only made for AX 2012, and we currently do not have any plans on making them available for AX 2009.

      My personal preference has always been to have all features (like PDA and barcoding) created inside AX, because this reduces the complexity of the installation, and also reduces the number of different tools that is required.

      I will send you some information about what I’m working on, and you maybe can be inspired to look into this direction.

      Happy DAXing 🙂



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.