Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't add one particular sales rep to invoice

Featured Replies

I have a solution that creates invoices in QB Desktop Pro 2017 using FileMaker 19 on Win 10. When I try to assign 1 particular sales rep to that invoice I get Error 3120 when the PCQB_RqExecute step is called. The error explanation is that it's an invalid argument and that the specified record does not exist in the list.

The ListID I'm using for the sales rep is from a query to get all the Sales Reps' List IDs. I get List IDs for the 3 sales reps when I do this query. Two of them work as expected when I send their sales rep List IDs as part of the InvoiceAdd process, but one of them is problematic and always results in error 3120. I've compared the ListID I get back in the query to the one I'm sending in the InvoiceAdd script and I've confirmed a couple of different ways that they're an exact match.

Another step I took in troubleshooting was to make sure I didn't have the SalesRep List record open, to eliminate the possibility of a record locking issue in QB. I also forced the index to rebuild in the field where the List ID is stored.

Here's what I get from PCQB_SGetXML( "Request" ; "" ) See the value in <SalesRepRef><ListID> element. That's what's causing the issue w/ only one particular sales rep.

Anyone have any ideas on what the problem might be? From what I can see it should work because I think I've eliminated all doubts about whether the SalesRep ListID value is valid.

Thanks in advance!

-Kent

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?qbxml version="13.0" ?>
<QBXML><QBXMLMsgsRq onError="stopOnError">
<InvoiceAddRq><InvoiceAdd>
<CustomerRef>
	<ListID>
		80000019-1582766293
	</ListID>
</CustomerRef>
<TxnDate>
	2021-06-12
</TxnDate>
<SalesRepRef>
	<ListID>
		8000002F-1616176095
	</ListID>
</SalesRepRef>
<ShipDate>
	2021-06-12
</ShipDate>
<InvoiceLineAdd>
	<ItemRef>
		<ListID>
			80000048-1583688064
		</ListID>
	</ItemRef>
	<Desc>
		4.25" Anemone, UPC: 560333098761, 10 units/product, $2.68/unit
	</Desc>
	<Quantity>
		112.00000
	</Quantity>
	<Rate>
		26.80
	</Rate>
</InvoiceLineAdd>
</InvoiceAdd>
</InvoiceAddRq>
</QBXMLMsgsRq>
</QBXML>

 

Edited by Kent Searight

Are all three Sales Reps records Active?

Is the SalesRepEntity record (Employee, Vendor, OtherName) Active?

What's the full text of the error message?

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC 28105
704.814.6852

  • Author

Hi Geoffrey,

The message I get is:

MESSAGE: Object "8000002F-1616176095" specified in the request cannot be found.  QuickBooks error message: Invalid argument.  The specified record does not exist in the list.

I verified that this particular SalesRep is active as an employee and as a SalesRep. Same as the ones that work. And just like the other two, it isn't listed as a Vendor nor does it have a listing in the Other Names list.

  • Author

Figured it out. I was pulling the wrong ID from the SalesRepRef query. Instead of the ListID I was pulling the ID from the FullName/ListID aggregate. I or someone else must've changed the script at some point after adding the first two reps. The rep record that kept failing is newer than them.

Do you know what that ID is for? It's the ID in the salesRepRef element preceding the rep's name.

		{
			"fullName" : "John Smith",
			"initials" : "JS",
			"listID" : "80000002-1616176105",
			"salesRepRef" : "8000002F-1616176095 John Smith"
		}

 

The calc that generated the text block you included is adding confusion, as the SalesRepRet doesn't have a FullName node of its own. The SalesRepEntityRef child node does, but it's actually referencing the values from a linked Employee, Vendor, or OtherName record. SalesRepRef is like a Value List utility table that gathers records from multiple table for display, and it's a pretty sure bet that the ListID in your text block's salesRepRef line could be used to query the three tables to identify the QB list source table.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated

14000 Creekside Drive
Matthews, NC 28105
704.814.6852

Edited by Geoffrey Gerhard

  • Author

Thanks, Geoffrey! 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.