Brian
Brian

Reputation: 1391

Unable to set RefNumber via QuickBooks XML (qbXML version 11.0)

I've tried both CheckAdd and CheckMod, and have been unable to set the RefNumber using QuickBooks Pro 2012 on Windows XP. I searched for RefNumber in the QuickBooks SDK Concepts Manual and didn't see anything that might address this problem. On the web, I did see a QODBC post on the topic.

Here's the CheckMod I tried. I don't receive an error when I issue this request; the RefNumber just isn't set.

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="11.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <CheckModRq>
            <CheckMod> <!-- required -->
                <TxnID >85-1388374219</TxnID> <!-- required -->
                <EditSequence >1388374219</EditSequence> <!-- required -->
                <RefNumber>12345678901</RefNumber>
            </CheckMod>
        </CheckModRq>
    </QBXMLMsgsRq>
</QBXML>

Upvotes: 1

Views: 493

Answers (2)

Hpjchobbes
Hpjchobbes

Reputation: 1319

One thing to keep in mind is if the check is marked "To Be Printed" (or "Print Later" in later versions of QuickBooks), you'll need to mod this to false in order for the RefNum to save. I tested using the following request (my TxnID and EditSequence will of course be different):

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="11.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "stopOnError">
        <CheckModRq requestID = "0">
            <CheckMod>
                <TxnID>3CF-1389105873</TxnID>
                <EditSequence>1389106557</EditSequence>
                <RefNumber>12345678901</RefNumber>
                <IsToBePrinted>0</IsToBePrinted>
            </CheckMod>
        </CheckModRq>
    </QBXMLMsgsRq>
</QBXML>

Upvotes: 0

user3150303
user3150303

Reputation: 11

I had the same issue, only using QBFC. I fixed it by changing the line :

requestMsgSet = sessionManager.CreateMsgSetRequest("US", 2, 0)

To:

requestMsgSet = sessionManager.CreateMsgSetRequest("US", 13, 0)

So by referencing QBXMLMajorVersion that was older they changed something so it would stop saving the refnumber. Changing it to the 13 fixed it.

Upvotes: 1

Related Questions