Knowledgebase
[QODBC-Desktop] Creating a Bill from a Purchase Order: How to Use FQSaveToCache and Understanding SDK Limitations
Posted by William - QODBC Support on 12 October 2026 07:44 AM

[QODBC-Desktop] Creating a Bill from a Purchase Order: How to Use FQSaveToCache and Understanding SDK Limitations

Problem Description:

Users attempting to create a Bill from a Purchase Order in QuickBooks Desktop via QODBC may find that a simple INSERT into the Bill table does not establish the proper parent-child relationship between the two records. Additionally, there are specific SDK limitations around bulk operations on linked transactions (Invoice/Payment) using OPENQUERY and FQSaveToCache.

Affected products: QODBC Desktop, QuickBooks Desktop (all editions)
Expected outcome: Bills are properly linked to their source Purchase Orders. Bulk inserts work correctly when following the proper FQSaveToCache or individual INSERT patterns.

Symptoms:

  • An INSERT into the Bill table succeeds, but QuickBooks does not show a "Bill from PO" link on the Bill record.
  • A customer tries to create an Invoice and then immediately credit-memo it through OPENQUERY/FQSaveToCache - only the first record gets created; subsequent records fail silently or error out.
  • An application that creates Purchase Orders via INSERT INTO PurchaseOrder expects a Bill to be auto-created, but no Bill appears.
  • Bulk inserts via OPENQUERY with FQSaveToCache = 0 create the first row successfully but fail on subsequent rows in the same transaction.

Cause:

This behavior stems from two separate aspects of the QuickBooks SDK:

  1. FQSaveToCache requirement for auto-creation: The QuickBooks SDK does not support creating linked records (Bill from PO, Invoice from SO, etc.) through standard INSERT statements. Instead, a flag called FQSaveToCache must be set on the parent record's INSERT to trigger the SDK to auto-create child records.
  2. Bulk insert limitations: The FQSaveToCache = 0 (save) only processes the final FQSaveToCache call in a batch. When using OPENQUERY with bulk inserts, each individual row is inserted into the cache, but only the last one triggers an actual QuickBooks API call.

Environment:

ProductVersion / Detail
QODBC Desktop All versions (FQSaveToCache flag available)
QuickBooks Desktop All editions (Enterprise, Pro, Premier)
Bulk operations OPENQUERY / FQSaveToCache behavior consistent across all versions

Solution:

The solution depends on which operation you are performing:

Creating a Bill from a Purchase Order (via FQSaveToCache)

  1. Create the Purchase Order first. Standard INSERT into the PurchaseOrder table:

    INSERT INTO PurchaseOrder
      (VendorRefListID, TxnDate, RefNumber, Memo, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache)
    VALUES
      ('80000002-1698067436', {d'2026-12-01'}, '5', '123 Main St', '8000000A-1695210988', '10', 0)
  2. Create the Bill with FQSaveToCache = 'True'. This tells the SDK to auto-create a Bill from the most recent Purchase Order:

    INSERT INTO BillItemLine
      (VendorRefListID, TxnDate, RefNumber, ItemLineItemRefListID, FQSaveToCache)
    Select VendorRefListID, TxnDate, RefNumber, PurchaseOrderLineItemRefListID, 0 From PurchaseOrderLine where VendorRefListID= '80000002-1698067436' and RefNumber='5'
  3. Verify the Bill was created in QuickBooks. Open the newly created Bill - it should contain all line items from the original Purchase Order and show a "Bill From PO" link.

 

SDK Limitation: Linked Transactions (Bill/ItemReceiptItemLine)

(Note: We already opened a case with Intuit about the reported issue in September 2022 with the case ID: 00119770 :
https://help.developer.intuit.com/s/question/0D50f000064pOStCAM/when-adding-a-bill-transaction-is-there-a-way-to-link-it-to-an-item-receipt-so-that-quickbooks-recognizes-that-the-item-receipt-has-been-billed-by-the-vendor)

 

SQL Examples:
Using OpenQuery to create a multiple-line CreditMemo:

INSERT openquery INSERT openquery(QREMOTE, 'select CreditMemoLineItemRefListID, CustomerRefListID, CustomerRefFullName, ARAccountRefListID, CreditMemoLineDesc, CreditMemoLineRate, CreditMemoLineQuantity, TxnDate, RefNumber, Memo, FQSaveToCache from CreditMemoLine')
VALUES ('7A0003-1044571005', '530001-1044572709', 'Retail Homeowners: Karen Dee', '50001-896816252', 'MICROGAP SPRING 2_3_16', '29.26', '2',{d'2023-07-22'},'396863','Ra','1')
INSERT openquery INSERT openquery(QREMOTE, 'select CreditMemoLineItemRefListID, CustomerRefListID, CustomerRefFullName, ARAccountRefListID, CreditMemoLineDesc, CreditMemoLineRate, CreditMemoLineQuantity, TxnDate, RefNumber, Memo, FQSaveToCache from CreditMemoLine')
VALUES ('7A0003-1044571005', '530001-1044572709', 'Retail Homeowners: Karen Dee', '50001-896816252', 'MICROGAP SPRING 2_3_16', '29.26', '3',{d'2023-07-22'},'396863','Ra','1')
INSERT openquery INSERT openquery(QREMOTE, 'select CustomerRefListID, CustomerRefFullName, ARAccountRefListID, TxnDate, RefNumber, Memo from CreditMemo')
VALUES ('530001-1044572709', 'Retail Homeowners: Karen Dee', '50001-896816252', {d'2023-07-22'}, '396863',' Test Memo')


Create a Purchase Order with line items (complete):

INSERT INTO PurchaseOrderLine (VendorRefListID, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, PurchaseOrderLineRate, FQSaveToCache) VALUES ('80000002-1698067436', '8000000A-1695210988', 10, 25.00, 1)
INSERT INTO PurchaseOrder (VendorRefListID, RefNumber, Memo) VALUES ('80000002-1698067436', '6', 'Office supplies')

Create a Bill from the above Purchase Order:

INSERT INTO BillItemLine
  (VendorRefListID, TxnDate, RefNumber, ItemLineItemRefListID, FQSaveToCache)
Select VendorRefListID, TxnDate, RefNumber, PurchaseOrderLineItemRefListID, 0 From PurchaseOrderLine where VendorRefListID= '80000002-1698067436' and RefNumber='6'

 

Example Scenarios:

Scenario 1 - Procurement workflow automation:

An application automatically creates Purchase Orders when inventory falls below a threshold, then creates Bills from those POs when goods are received. The key is: (1) INSERT into PurchaseOrder first, (2) then INSERT into Bill with FQSaveToCache = 'True'. The Bill will contain the same line items as the PO.

Scenario 2 - Bulk customer import:

A company needs to migrate 500 customers from another system. Since Customer records have no linked dependencies, they can safely use OPENQUERY with FQSaveToCache for bulk insert. This is much faster than individual INSERTs.

SDK Limitation: Bills Cannot Be Linked to ItemReceipt

QuickBooks Desktop's UI makes it appear that Bills can be linked to ItemReceipts via the "Receive the Bill" button in the vendor navigator. However, the QuickBooks SDK does not support establishing this link programmatically. The UI action actually converts the ItemReceipt to a Bill - the original ItemReceipt disappears and is replaced by the Bill. This conversion behavior is not available through the SDK.

If you need both an ItemReceipt and a linked Bill, you must:

  1. Create the ItemReceipt via INSERT into the ItemReceipt table.
  2. Do NOT attempt to link a Bill to it through QODBC.
  3. The QuickBooks SDK does not expose any field to establish this relationship - it is a permanent Intuit SDK limitation (Intuit case ID: 00119770).
Known Issue

QODBC opened a case with Intuit (case ID 00119770, Sep 23 2022) regarding the inability to convert Item Receipt to Bill via SDK. Intuit confirmed there is no direct way and directed to a community workaround link. As of this writing, no SDK workaround exists.

Additional Notes:

  • FQSaveToCache only works one at a time: Each Bill created via FQSaveToCache uses the most recent (unbilled) Purchase Order. You cannot batch-create multiple Bills from multiple POs in a single INSERT.
  • FQSaveToCache = 'True' is case-sensitive: The value must be exactly 'True' (capitalized), not 'true', 'TRUE', or 1.
  • Bulk operations and linked records: If your application creates linked records (Invoice→Payment, PO→Bill, SO→Invoice), each pair must be created through separate INSERT calls - never in a bulk batch.
  • FQSaveToCache = 0 vs. 1: Use 0 to commit immediately, 1 to cache for later. Only the final FQSaveToCache = 0 call triggers the actual QuickBooks API action in any given batch.
  • SDK limitation is permanent: This behavior is built into the QuickBooks SDK and cannot be bypassed through QODBC configuration.

Understanding QODBC Error Codes FQSaveToCache Behavior for Bulk Inserts in QODBC How to Activate/Deactivate QODBC License

Keywords:

FQSaveToCache Bill from Purchase Order SDK Limitation FQSaveToCache OPENQUERY Linked Transactions Invoice Payment Bulk Insert QuickBooks SDK PO to Bill Auto-create Record
(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).