PO Receipt of Goods what objects to use

SUGGESTED

Visual Studio VB app.

I want to use SelectNewBatch method.  I am using these objects:

taskID = oSS.nLookupTask("PO_ReceiptOfGoods_ui")
retVAL = oSS.nSetProgram(taskID)
oSEC = oPVX.NewObject("PO_ReceiptOfGoods_ui", oSS)
oBUS = oPVX.NewObject("PO_ReceiptOfGoodsDetail_bus", oSS)

 r = oBUS.nSelectNewBatch(BatchNo, PrivateFlag, CommentText)

I am getting 

I know nSelectNewBatch is not here but should it not be?

I was expecting to have a PO_ReceiptOfGoods_bus object and then I could use oLines and ODistribution but I don't see that in the Object Reference.

What objects do I need to do a PO Receipt of Goods Entry?

I was thinking it worked along these lines:

There is a great example for SO Invoice Data Entry using BOI from the class.

Is there any example for PO Receipt of Goods Entry?

  • 0
    SUGGESTED

    Use PO_ReceiptOfGoods_UI for the LookupTask.

    Use PO_Receipt_Bus for the NewObject. 

    Do not bother getting your own handle to PO_ReceiptOfGoodsDetail_bus because you will access it using the oLines property of PO_Receipt_Bus.

    Use the nSelectBatch() method to create/select your batch.

    Use nGetNextReceiptNo() to get the next receipt number.

    Use nSetKeyValue() on the "ReceiptType$" and "ReceiptNo$" fields before using nSetKey() without any arguments.

    Use nSetValue() to set your purchase order number.

    Optionally use nCopyFromPurchaseOrder with the purchase order number as the argument to copy the purchase order header info.

    Optionally use nCopyPurchaseOrderLines(x) to copy the lines from the purchase order where the x in the argument is 0 if you don't want to receive completely or 1 if you do want to receive completely.

    Use nSetValue on anything else you want to set specifically.

  • FormerMember
    0 FormerMember in reply to David Speck

    David,

    Sage should put you on a retainer so you don't wonder off on us again. Blush

  • 0 in reply to David Speck

    I will try this and let you know.  Will be tomorrow,  Thank you.

  • 0 in reply to David Speck

    We have a winner.  I have Next Batch.  I will continue to code this.  Thank you so much for the guidance.