Author Topic: [SOLVED] Invalid Argument. The specified record does not exist in the list  (Read 13152 times)

johnlewisdesign

  • Member
  • *
  • Posts: 81
Re: Asterisk in SKU
« Reply #15 on: February 19, 2013, 07:31:39 AM »
I fixed it!!!  ;D ;D ;D ;D

Turns out your SGetXML suggestion was an absolute godsend. I was able to diff the two files (the old, working version vs the new, broken one) and it was then plain to see the Line Item's Link ID was missing from the request!

So the outcome is I feel like an idiot - but at the same time, had I not gone down this path, I would still be an idiot!  ;D  Massively happy I've nailed it once and for all though.

Thank you SO MUCH for your help Geoffrey, I will keep my hand in around here from now on and give something back where I can.

Kindest regards,

John

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: [SOLVED] Asterisk in SKU
« Reply #16 on: February 19, 2013, 08:09:56 AM »
There are several elements that link a Txn or TxnLine to another Txn, but I didn't see any in your original code so I'm guessing you mean something else. Can you be more specific about the missing "Line Item Link ID" in your Request?

TIA,

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

johnlewisdesign

  • Member
  • *
  • Posts: 81
Re: [SOLVED] Asterisk in SKU
« Reply #17 on: February 19, 2013, 09:19:02 AM »
Sure, this was the missing code:

Code: [Select]
Set Variable [$QBResult; Value:PCQB_RqAddFieldWithValue( "ItemRef::ListID" ; Stock_Fm_Invoice_Line_Items::QB_ListID )]
This added the required XML:

Code: [Select]
<ItemRef>
<ListID>8000277B-1359055530</ListID>
</ItemRef>

Now its working seamlessly! Phew.


EDIT: Changed title to better reflect the problem, for other users, and marked as solved.
« Last Edit: February 19, 2013, 09:20:42 AM by johnlewisdesign »