How do I query non-inventory items using QuickBooks Desktop IPP SDK? My code only gets the service items and discounts:
ItemConsolidatedQuery itQuery = new ItemConsolidatedQuery();
itQuery.NameContains = theName;
var itemsList = itQuery.ExecuteQuery<ItemConsolidated>(dataServices.ServiceContext).ToList();
ItemConsolidated should get you all items, including non-inventory items.
If you're sure that you aren't getting any non-inventory items back, and that Sync Manager has run recently, and that you're hitting the correct realmID (F2 in QuickBooks will show you the realm ID of the QuickBooks file) then I would submit a support ticket to Intuit.
NonInventory Item is displayed on querying ItemConsolidated entity. It will be under the type “Product” item.
Can you please try to test this use case using apiexplorer tool.
Link - https://developer.intuit.com/apiexplorer?apiname=V2QBD
PFB a sample request
<ItemConsolidated>
<Id idDomain="QB">24</Id>
<SyncToken>1</SyncToken>
<MetaData>
<CreatedBy>app</CreatedBy>
<CreateTime>1999-07-29T18:24:16.0Z</CreateTime>
<LastModifiedBy>app</LastModifiedBy>
<LastUpdatedTime>2007-05-05T16:42:40.0Z</LastUpdatedTime>
</MetaData>
<ExternalKey idDomain="QB">24</ExternalKey>
<Synchronized>true</Synchronized>
<Name>Appliance</Name>
<Active>true</Active>
<UnitPrice>
<CurrencyCode>USD</CurrencyCode>
<Amount>0</Amount>
</UnitPrice>
<Type>Product</Type>
<SalesTaxCodeId idDomain="QB">1</SalesTaxCodeId>
<SalesTaxCodeName>Tax</SalesTaxCodeName>
</ItemConsolidated>
Doc Ref -https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0500_quickbooks_windows/0600_object_reference/itemconsolidated
Related
I am currently trying to work with the SuiteTalk 2017_2_0 API for a new integration with NetSuite. I have all the basics rolling of single record retrieval, etc.; however, I am having a problem trying to figure out how to list all of a given object/type in the system.
Example: I want to list ALL InventoryItem data.
Not sure what I am missing. Does anyone have a sample SOAP doc?
What I did so far
I have been working primarily with types: Sales Order, Customer and Inventory Item.
Tried using the getAll call defined in the WSDL - only supports limited fields:
budgetCategory
campaign*
currency
etc.
Tried using getList but a set of internal IDs are required in the baseRef/RecordRef (INVALID_KEY_OR_REF - The specified key is invalid.)
Fails:
<urn:getList>
<urn1:baseRef xsi:type="core:RecordRef" type="salesOrder" />
</urn:getList>
Succeeds:
<urn:getList>
<urn1:baseRef xsi:type="core:RecordRef" type="salesOrder" internalId="1" />
<urn1:baseRef xsi:type="core:RecordRef" type="salesOrder" internalId="2" />
</urn:getList>
Tried formulating a search that would return all the data but the types I need are unavailable (or I haven't been able to figure it out)
Define a saved search that pulls the appropriate data, then call the saved search.
I'm trying to search for a given user on a Sharepoint site using "lastname, firstname". I was able to use the following url to get the total list of site users as a large XML document:
https://thissite.com/sites/thatsite/_api/web/siteusers/
However, I haven’t been able to figure out how to search by Title. When I use the following url:
https://thissite.com/sites/thatsite/_api/web/siteusers/getbytitle(“lastname,%20firstname”)
I get this error:
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>
-1, Microsoft.SharePoint.Client.InvalidClientQueryException
</m:code>
<m:message xml:lang="en-US">
The expression "web/siteusers/getbytitle("lastname, firstname")" is not valid.
</m:message>
</m:error>
When I use the following url to get the same user's data:
https://thissite.com/sites/thatsite/_api/web/siteusers/getbyid(41)
Then I successfully get XML returned with that user's data.
I guess I could just parse the list obtained from /siteusers and load it into a searchable data object, but I was hoping for something more direct.
UserCollection resource does not expose getbytitle method, that's the reason why you get this exception.
In order filter user by title you could utilize $filter query option as demonstrated below:
https://contoso.sharepoint.com/_api/web/siteusers?$filter=Title eq '<Title>'
I am trying to add a $20 payment to a bill. This is from the sample Quickbooks file. However i am getting the error Object \"3E42-1071498278\" specified in the request cannot be found. " Any ideas. I have tried multiple things. I have indeed checked that the bill exists. I have included below the generated qbxml from the sdk. I am using version 13 of the sdk and QB version 14. Changing the date has no bearing on the error response
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError = "continueOnError">
<BillPaymentCheckAddRq requestID = "0">
<BillPaymentCheckAdd>
<PayeeEntityRef>
<FullName>Sergeant Insurance</FullName>
</PayeeEntityRef>
<APAccountRef>
<FullName>Accounts Payable</FullName>
</APAccountRef>
<TxnDate>2017-01-21</TxnDate>
<BankAccountRef>
<ListID>20000-933270541</ListID>
<FullName>Checking</FullName>
</BankAccountRef>
<RefNumber>11000</RefNumber>
<Memo>786-35 Sample</Memo>
<ExchangeRate>1.000000</ExchangeRate>
<AppliedToTxnAdd>
<TxnID>3E42-1071498278</TxnID>
<PaymentAmount>20.00</PaymentAmount>
</AppliedToTxnAdd>
</BillPaymentCheckAdd>
</BillPaymentCheckAddRq>
</QBXMLMsgsRq>
</QBXML>
The error says the transaction with that ID cannot be found. You may see the transaction in QB, but how do you know that the transaction you are looking at in QB has that ID? QB does not think it does.
I would expect to see a BillToPayQueryRq and pulling the transactionID out of the BillToPayQueryRs.
Make sure the payeeEntityRef matches the Bill Txn. You can provide a valid TxnID but if it is not tied to the proper Payee QB will give a TXNID not found error.
I'm working on a website for a client that integrates into QuickBook desktop. I need to get a listing of all the checks for a specific account (ideally I would like all transactions for that account [regardless of their type] but if I have to get them one at a time that's fine). When I send the following XML:
<ns1:sendRequestXMLResponse>
<ns1:sendRequestXMLResult>
<xml version="1.0" encoding="utf-8" ?>
<qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<CheckQueryRq>
<AccountFilter>
<ListID>800000F1-1362066981</ListID>
</AccountFilter>
<IncludeLineItems>true</IncludeLineItems>
</CheckQueryRq>
</QBXMLMsgsRq>
</QBXML>
</ns1:sendRequestXMLResult>
</ns1:sendRequestXMLResponse>
I receive the following error:
<CheckQueryRs statusCode="1" statusSeverity="Info" statusMessage="A query request did not find a matching object in QuickBooks" />
If I go into QuickBooks I can see there are checks associated with the account so I'm not sure why this doesn't return a result.
Update 1: I rewrote this without the AccountFilter so it returned every check and I found checkes with the 800000F1-1362066981 account. It's also 10 MB so it's really hard to work with. :-)
I have to code a PHP front end for my Jasper reports. I could successfully connect to the server, authenticate and view the repositories using the jasper REST calls. However, when I try to access a report, I get the following error in the response body:
Report not found (uuid not found in session)
The php code is given below:
$uri = "http://localhost:8080/jasperserver/rest/report/samples/Client_Information_Report?RUN_OUTPUT_FORMAT=html";
//PUT request to run the report
$response = Httpful\Request::put($uri, $payload)
->authenticateWith("jasperadmin", "jasperadmin")
->send();
$xml = new SimpleXMLElement($response->body);
$uuid = (String)$xml->uuid; //The uuid is successfully returned
$uri = "http://localhost:8080/jasperserver/rest/report/$uuid?file=report";
$report = Httpful\Request::get($uri)
->authenticateWith("jasperadmin", "jasperadmin")
->send();
I am able to confirm that a uuid is returned with the first PUT. Is there anything I am missing here? Any help is appreciated.
Janenz,
First check the info that is coming from the PUT response to see if there is actually a report being generated and that is not empty, you should receive something like this:
<report>
<uuid>d7bf6c9-9077-41f7-a2d4-8682e74b637e</uuid>
<originalUri>/reports/samples/AllAccounts</originalUri>
<totalPages>43</totalPages>
<startPage>1</startPage>
<endPage>43</endPage>
<file type="image/png">img_0_0_0</file>
<file type="image/gif">px</file>
<file type="text/html">report</file>
<file type="image/jpeg">img_0_42_27</file>
<file type="image/png">img_0_42_26</file>
</report>
Notice the number of pages and the files available.
I have not used the Httpful library, but another thing to check is the way that library uses the Basic Authentication. It may happen that the second call is logging you in again and creating a new session; that is why you cannot find the UUID of the current session.
I have a full JasperServer and PHP sample in GitHub that you can check, it has the repository browsing and input control rendering implemented.
I'm not sure what version of JasperReports Server you are using but in the new version there is a new REST API that makes requesting reports a lot easier; check the JasperReports Server Web Services Guide (Section 3.2). I have that implemented in the JRS-Wrapper Branch of my project.
Hope this helps!!
MarianoL