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"