Author Topic: Add Received Items to a PO already moved to QB  (Read 2775 times)


  • Member
  • *
  • Posts: 8
Add Received Items to a PO already moved to QB
« on: May 02, 2010, 02:25:00 PM »
The QB SDK refers to the procedure to receive items for a PO, in an instance when items are received, but a Vendor invoice has not been received.  The SDK indicates that the QB PO  TxnID AND PO line TxnLineID must be added to the Add request.   

I am receiving error 3153 "The specified Parameters conflict with each other".   I have tried this script without the two lines that Link to a Transaction and it successfully adds an item receipt with lines.  So the problem seems to be with the link to transaction script steps. 

The PO Txn ID (Parent record) in my data is:  7CCE-1387137269
and line item TxnID's are:  7CD0-1387137269  and  7CD1-1387137269

#PO Header Receipt Add
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("VendorRef::FullName";PO Main::q_corresponding_qb_vendor) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("APAccountRef::FullName";"Accounts Payable") ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("TxnDate";PO Main::b_Date_Received) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("RefNumber";PO Main::b_1PO_Number_n) ]

#PO Lines Received
Go to Record/Request/Page
[ First ]
Set Field [ PO Main::q_qb_result; PCQB_RqAddRelatedRecord("ItemLineAdd";"") ]
Set Field [ PO Main::q_qb_result; PCQB_RqAddFieldWithValue("ItemRef::FullName";PO_Line::b_QB_lineitemref_t) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("Desc";PO_Line::c_QB_part_Desc_t) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("Quantity";PO_Line::b_Qty_Ordered) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("Cost";PO_Line::b_Price) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("ClassRef::FullName";PO_Line::b_QB_Class) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("LinkToTxn::TxnID";POL__PO::q_qb_TxnID_t) ]
Set Field [ PO Main::q_qb_result;PCQB_RqAddFieldWithValue("LinkToTxn::TxnLineID";PO_Line::q_Line_TxnID_t) ]
Set Field [ PO Main::q_qb_result; PCQB_RqCloseRelatedRecord ]
Go to Record/Request/Page
[ Next; Exit after last ]
End Loop

Thanks for any feedback on this.
Robert Roll
Integral Circuits-San Francisco

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: Add Received Items to a PO already moved to QB
« Reply #1 on: May 03, 2010, 11:27:24 AM »
Which QB version?

Are you using FMP Advanced?

Have you tried running a query on the PO to confirm the values of the three TxnIDs?

If you're using FMP Advanced, what happens if you manipulate the loop so that only one PO_Line record is included? (Do both error individually, or only one?)

Is there a third related record in PO Lines Received?

Is there any chance that "POL__PO::q_qb_TxnID_t" is pointing to the wrong record's TxnID? (Confirm the field's value is 7CCE-1387137269 when viewed from the perspective of PO Lines Received for both lines.)

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852
704) 814-6853 (FAX)


  • God
  • Member
  • *****
  • Posts: 83
Re: Add Received Items to a PO already moved to QB
« Reply #2 on: May 14, 2010, 05:41:52 PM »
Here is one of those morsels of information that is a little burried in the SDK (it is actually in the OSR ).....

"  The LinkToTxn aggregate allows you to bring in a specific line item from a transaction. If you want to link an entire transaction and bring in all its lines, use the LinkToTxnID aggregate. Notice that if you use LinkToTxn in the item line, you cannot use ItemRef in that line: you'll get a runtime error. LinkToTxn brings in all the item information you need. (You can, however, specify whatever quantity or rate that you want, or any other item line element other than ItemRef."

So, in your scripts omit the PCQB_RqAddFieldWithValue( "ItemRef::.......  step and things should work.