Plug-ins > FM Books Connector Online

SalesItemLineDetail not a valid related type?

(1/1)

pjreagan:
Hmm...  I'm probably doing something wrong but QBO is not accepting "SalesItemLineData" as a valid type for a related record. 

The Developer's Guide, Demo File and ESR all seem to indicate that this code should work, but it doesn't..
PCQO_RqNew("create"; "Invoice") & ", " &
PCQO_RqAddFieldWithValue("TxnDate"; "2009-10-06") & ", " &
PCQO_RqAddFieldWithValue("PrivateNote"; "Exported from custom application") & ", " &
PCQO_RqAddRelatedRecord("Line") & ", " &
PCQO_RqAddFieldWithValue("Description"; "Late Fee: 11/5/2009 - 6/6/2014 at 10 percent") & ", " &
PCQO_RqAddFieldWithValue("Amount"; 1012.99) & ", " &
PCQO_RqAddFieldWithValue("DetailType"; "SalesItemLineDetail") & ", " &
PCQO_RqAddRelatedRecord("SalesItemLineData") & &
PCQO_SGetStatus


This is the error result that always comes up....
0, 0, 0, 0, 0, 0, 0, !!ERROR!!
An error occurred while adding a related record
CODE: -507
SEVERITY: Error
MESSAGE: Invalid type of related record
SOURCE: PCQO_RqAddRelatedRecord

What am I missing?

Jerel Malong:
It should be:

PCQO_RqAddRelatedRecord( "Line" )
<< HEADER DETAILS HERE >>
PCQO_RqAddRelatedRecord( "SalesItemLineDetail" )
<< LINE DETAILS HERE >>
PCQO_RqCloseRelatedRecord
PCQO_RqCloseRelatedRecord

pjreagan:
Sorry, I should have give more detail.  Yes, I understand that xml structure.  My design gathers each PCQO call in a global script variable as separate values (also known as a "virtual list").  After the script is done checking and creating all accounts/items/customers/etc. in QBOE, it loops through the virtual list to run each of the PCQO calls.  It was getting stuck at...
  PCQO_RqAddRelatedRecord("SalesItemLineData")
...because of a typo.  It should have been...
  PCQO_RqAddRelatedRecord("SalesItemLineDetail")

This became apparent when I manually created an invoice in QBO, queried it from FileMaker then compared the xml.
Sorry to bother you with a typo.  Details given for future readers.

Navigation

[0] Message Index

Go to full version