1

When I try to add an Invoice via the .net IPP SDK, the invoice add request runs successfully, but I'm getting an error once the sync is initiated from the sync manager in Quickbooks. The error is only visible when retrieving the status with GetSyncActivity()

The error that I'm seeing is:

QBXML validation error: [severity=FATAL_ERROR,message=cvc-complex-type.2.4.a: Invalid content was found starting with element 'TxnDate'. One of '{CustomerRef}' is expected.,locator=[url=null,line=-1,column=-1,node=null,object=com.intuit.sb.datasync.writeback.qbxml.schema.InvoiceAdd@4538d9d1,field=null]]

I've enabled request logging, and upon looking at the invoice XML generated and sent, it doesn't look like there is anything wrong if I compare it with sample requests in the online documentation. I've tried specifying other customer ID's thinking that might be the issue, specifying billing address/shipping address, and specifying ARAccountRef, but none of these changes had any impact on the error..

Is there something I'm missing, or anything that you can think of that I can try to resolve this?

Request:

<Add xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.intuit.com/sb/cdm/v2" RequestId="fd0822d7666248119d8ee482f264bd84" FullResponse="true">
<ExternalRealmId>Realm ID removed</ExternalRealmId>
<Object xsi:type="Invoice">
<SyncToken>0</SyncToken>
<MetaData>
<CreateTime>2013-02-24T18:05:21.1706511-05:00</CreateTime>
<LastUpdatedTime>2013-02-24T18:05:21.1706511-05:00</LastUpdatedTime>
</MetaData>
<Header>
<DocNumber>232751</DocNumber>
<CustomerId>11505739</CustomerId>
<CustomerName/>
<TotalAmt>900.00</TotalAmt>
<SalesTermId idDomain="QB">3</SalesTermId>
<DueDate>2013-02-24T00:00:00-05:00</DueDate>
<BillAddr/>
<ShipAddr/>
<ShipMethodId/>
<DiscountAmt>0</DiscountAmt>
</Header>
<Line>
<Desc>Test</Desc>
<Amount>900.00</Amount>
<ItemId>3377682</ItemId>
<UnitPrice>180.00</UnitPrice>
<Qty>5</Qty>
<ServiceDate>2013-02-24T18:05:21.1956543-05:00</ServiceDate>
</Line>
</Object>
</Add>

Response:

<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
<Success RequestId="fd0822d7666248119d8ee482f264bd84">
<Invoice>
<Id idDomain="NG">12313656</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreatedBy>app</CreatedBy>
<CreateTime>2013-02-24T23:05:25Z</CreateTime>
<LastModifiedBy>app</LastModifiedBy>
<LastUpdatedTime>2013-02-24T23:05:25Z</LastUpdatedTime>
</MetaData>
<Synchronized>false</Synchronized>
<Header>
<DocNumber>232751</DocNumber>
<TxnDate>2013-02-24T00:00:00Z</TxnDate>
<CustomerId idDomain="NG">11505739</CustomerId>
<SubTotalAmt>900</SubTotalAmt>
<TaxRate>0</TaxRate>
<TaxAmt>0</TaxAmt>
<TotalAmt>900</TotalAmt>
<SalesTermId idDomain="QB">3</SalesTermId>
<DueDate>2013-02-24T00:00:00Z</DueDate>
<BillAddr>
<Tag>Billing</Tag>
</BillAddr>
<ShipAddr>
<Tag>Shipping</Tag>
</ShipAddr>
<Balance>900</Balance>
</Header>
<Line>
<Id idDomain="NG">37505805</Id>
<Desc>Test</Desc>
<Amount>900</Amount>
<Taxable>false</Taxable>
<ItemId idDomain="NG">3377682</ItemId>
<UnitPrice>180</UnitPrice>
<Qty>5</Qty>
<ServiceDate>2013-02-24T00:00:00Z</ServiceDate>
</Line>
</Invoice>
<RequestName>InvoiceAdd</RequestName>
<ProcessedTime>2013-02-24T23:05:25Z</ProcessedTime>
</Success>
</RestResponse>

Information retrieved via call to GetSyncStatus(...) with ErroredObjectsOnly=True specified

requestId: "fd0822d7666248119d8ee482f264bd84",
stateCode: "9",
stateDesc: "Record has fatal error",
messageCode: "100",
messageDesc: "QBXML validation error: [severity=FATAL_ERROR,message=cvc-complex-type.2.4.a: Invalid content was found starting with element 'TxnDate'. One of '{CustomerRef}' is expected.,locator=[url=null,line=-1,column=-1,node=null,object=com.intuit.sb.datasync.writeback.qbxml.schema.InvoiceAdd@4538d9d1,field=null]] ",
responseLogTMS: "2013-02-24T23:06:22Z",
idsType: "Intuit.Ipp.Data.Qbd"
Manas Mukherjee
  • 5,270
  • 3
  • 18
  • 30
Dan Smith
  • 102
  • 2
  • 14
  • Dan can you check to make sure the customer exists in QuickBooks on the desktop. 11505739. Did someone remove the customer from QuickBooks before the record synced from the cloud to the desktop? – Jarred Keneally Feb 25 '13 at 13:33
  • I can see that the customer is in the cloud, so the only other thing I can think of is that the customer was deleted from the desktop. – Jarred Keneally Feb 25 '13 at 14:38
  • @JarredKeneally, I tried associating with a different customer also, and same thing happens. I can confirm the customer does indeed exist in Quickbooks on the desktop also; I can make changes to the customer and they appear on the cloud... Requests to add more invoices though, continue to fail. I can see that some went through successfully yesterday also, but I can't find anything different with the ones that are in there successfully. 12303352:NG -- modified billing line, made sure that it propagated to the cloud. 12303351:NG -- no changes. Not sure how they went through successfully. – Dan Smith Feb 25 '13 at 15:54
  • The customer has an ID of 11505739:NG when accessed via the CustomerQuery... When invoices are added to that customer via QB though, it has a different ID: 73:QB; both ID's refer to the same Customer... If I add the invoice using the 73:QB, the invoice adds. If I add using the 11505739:NG, it throws an error. There's no way for me to retrieve this :QB ID from a query though. Is this a bug? – Dan Smith Feb 25 '13 at 16:30
  • Once the sync process happens, the data entity gets marked as errored state. You can only query for errored objects by adding the errored objects filter, they do not show in a typical Invoice query. You would need to revert, or fix the record for it to come out of the error state. – Jarred Keneally Feb 25 '13 at 18:59
  • NG The object was created by a call to Data Services for QuickBooks. (The operation.) QB The object was created by QuickBooks Desktop and then uploaded to the cloud by Intuit Sync Manager. QBO The object was created by QuickBooks Online or Data Services for QuickBooks Online. – Jarred Keneally Feb 25 '13 at 19:01
  • There could be a bug in the write back, it seems local to your realm though. You could try creating a new realm. Ill pass this on to the QA team to review. – Jarred Keneally Feb 25 '13 at 19:03
  • @JarredKeneally, Should I wait to create a new realm until after QA looks at it? If there is a problem here that could be fixed so that it doesn't recur, I'd like to see that happen and would hate to destroy the test data needed to reproduce it. – Dan Smith Feb 25 '13 at 19:12
  • no problem Ill have qa look at it, if you wouldnt mind submitting a support ticket and adding your requests and responses, and the sync responses Ill that would be helpful – Jarred Keneally Feb 25 '13 at 19:25
  • Dan can you try one more thing. remove the null customer name and only use the customer id. – Jarred Keneally Feb 25 '13 at 21:13
  • @JarredKeneally, I'm not specifying the CustomerName anywhere. The IPP C# DevKit adds that in automatically. Also, I tried resetting the Sync Manager, disconnecting the app and so forth, but the realm number remains the same (ending in 43220)... Same error, so I seem to be out of luck. Is there some trick to getting assigned a new realm number/completely new registration, short of signing up for a new Intuit account? – Dan Smith Feb 26 '13 at 00:03
  • Can you try it with the API Explorer? developer.intuit.com/apiexplorer – Jarred Keneally Feb 26 '13 at 00:47
  • @JarredKeneally, I tried with API explorer, using same request but changing Request GUID and removing the ; Same result, adds but the same error comes back from the SyncActivity about the CustomerRef. Always works with the :QB, never with the :NG, but they both refer to same customer. Is there anything else I can try? I submitted a ticket through the IPP portal early yesterday. Thanks! – Dan Smith Feb 26 '13 at 13:30
  • 1
    Is there anything else I can do from my end? I'm pretty much stuck at this point... No reply from IPP support portal yet. – Dan Smith Feb 27 '13 at 19:23
  • Did you ever resolve the issue? If so please post the solution. Thanks! – ra9r Feb 07 '16 at 21:15

0 Answers0