1

We are trying to add an Invoice with 'SetCredit' using QBXML - WebConnector. (QBXML is formed right)

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="12.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <InvoiceAddRq requestID="26321">
      <InvoiceAdd>
        <CustomerRef>
          <ListID>4E0000-1201550597</ListID>
        </CustomerRef>
        <ClassRef>
          <ListID>10000-1200441777</ListID>
        </ClassRef>
        <ARAccountRef>
          <ListID>80000-1196902636</ListID>
        </ARAccountRef>
        <TemplateRef>
          <ListID>80000026-1360099831</ListID>
        </TemplateRef>
        <TxnDate>2013-05-29</TxnDate>
        <RefNumber>5957</RefNumber>
        <BillAddress>
          <Addr1>ABC Customer</Addr1>
          <Addr2>1110 South Ave</Addr2>
          <Addr3>
          </Addr3>
          <City>Rapids</City>
          <State>MN</State>
          <PostalCode>55555</PostalCode>
        </BillAddress>
        <DueDate>2013-05-29</DueDate>
        <IsToBePrinted>0</IsToBePrinted>
        <IsToBeEmailed>0</IsToBeEmailed>
        <SetCredit>
          <CreditTxnID>D4700-1369861742</CreditTxnID>
          <AppliedAmount>20.00</AppliedAmount>
        </SetCredit>
        <InvoiceLineAdd>
          <ItemRef>
            <ListID>F0000-1228155795</ListID>
          </ItemRef>
          <Quantity>1</Quantity>
          <Rate>250.00</Rate>
          <ClassRef>
            <ListID>10000-1200441777</ListID>
          </ClassRef>
          <Amount>250.00</Amount>
        </InvoiceLineAdd>
      </InvoiceAdd>
    </InvoiceAddRq>
  </QBXMLMsgsRq>
</QBXML>

Note: We have 'QuickBooks Enterprise Solutions 13.0'. No one else has the QuickBooks file open. We also closed the quickbooks enterprise UI.

Adding invoice with 'SetCredit' throws up below error when quickbooks mode is set to 'Multi-User'.

3176 - A related CreditTxnID object D4700-1369861742 is already in use, or failed to acquire the lock for this object. QuickBooks error message: Can't lock the credits

However, Invoice gets added fine with 'SetCredit' when changing QuickBooks mode to 'Single-User' mode.

Please provide a fix to this error, as we need to have quickbooks in 'Multi-User' mode.

Thanks,

Arun

Jarred Keneally
  • 1,931
  • 11
  • 12
Arun B
  • 61
  • 1
  • 1
  • 2
  • Do we have any luck to solve '3176: A related CreditTxnID object' error in multi-user mode. I am facing same error to add Invoice through SDK. It would be very helpful for me if you provide solution on same. Thanks, Tejas Patel – Tejas Patel Jun 02 '17 at 09:19

2 Answers2

0

Try using QBXML 10 or 11 instead of 12. Looks like this might be a bug with using 12.

William Lorfing
  • 2,656
  • 10
  • 7
0

I have the same problem, in multi-user mode the SetCredit section of an Invoice add fails with error 3176. What seems to work instead is to create the invoice without the SetCredit, then do a ReceivePaymentAddRq applied to that invoice with a 0.00 TotalAmount, a 0.00 PaymentAmount, and then specify the SetCredit section:

<?xml version="1.0" ?>
<?qbxml version="8.0"?>
  <QBXML>
    <QBXMLMsgsRq onError="stopOnError">
      <ReceivePaymentAddRq>
        <ReceivePaymentAdd>
          <CustomerRef>
            <ListID>800031DD-1539372418</ListID>
          </CustomerRef>
          <ARAccountRef>
            <ListID>510000-870536085</ListID>
          </ARAccountRef>
          <TxnDate>2018-10-12</TxnDate>
          <TotalAmount>0.00</TotalAmount>
          <AppliedToTxnAdd>
            <TxnID>3CBD5C-1539373452</TxnID>
            <PaymentAmount>0.00</PaymentAmount>
            <SetCredit>
              <CreditTxnID>3CBD6A-1539373513</CreditTxnID>
              <AppliedAmount>250.00</AppliedAmount>
            </SetCredit>
          </AppliedToTxnAdd>
        </ReceivePaymentAdd>
      </ReceivePaymentAddRq>
    </QBXMLMsgsRq>
  </QBXML>
Scott O.
  • 898
  • 1
  • 9
  • 15