Comments (10)
Looks like a bug to me. Thanks for the feedback, we will look into this and fix it in our next release.
from quickbooks-v3-dotnet-sdk.
In the 5.3 SDK release, can you try this code?
Batch batch = commonServiceQBO.CreateNewBatch();
batch.Add("select * from Account startPosition 0 maxResults 10", "queryAccount");
batch.Execute();
if (batch.IntuitBatchItemResponses != null && batch.IntuitBatchItemResponses.Count() > 0)
{
IntuitBatchResponse res = batch.IntuitBatchItemResponses.FirstOrDefault();
List<Account> acc = res.Entities.ToList().ConvertAll(item => item as Account);
};
from quickbooks-v3-dotnet-sdk.
We don't support LINQ detailed extensions as we deprecated them earlier due to some issues. Some simpler ones like the one I suggested above works.
from quickbooks-v3-dotnet-sdk.
Hi @nimisha84
I don't see how this query you suggested
select * from Account startPosition 0 maxResults 10
Has anything to do with SELECT Count( *). I also don't see what LinQ detailed extensions have to do with SELECT Count( *) either.
Will I be able to get the totalCount value from the SELECT Count( *) query in the next release? If so, what release would that be? 5.4?
Thanks.
from quickbooks-v3-dotnet-sdk.
I might have misunderstood your query earlier thinking the count was required for the batch itemresponse and not the actual count query. I mentioned linq as I saw you used this-FirstOrDefault(item => item.Id == batchId);
I am looking at this issue again and hopefully should be able to fix this in 5.4 unless any other high priority issues come up. Will keep you posted.
Thanks for the feedback.
Also, I would like to understand why you would want to call count query in batch and not as a regular query instead? Is there a specific use case?
from quickbooks-v3-dotnet-sdk.
How would I call count query in a regular query using the SDK? The only way I've found to execute a custom query is through Intuit.Ipp.DataService.Batch.
Thanks for re opening the issue.
from quickbooks-v3-dotnet-sdk.
DataService commonServiceQBO = new DataService(serviceContext);
QueryService<Invoice> inService = new QueryService<Invoice>(serviceContext);
var In = inService.ExecuteIdsQuery("SELECT count(*) FROM Invoice");
or int count= inService.ExecuteIdsQuery("SELECT count(*) FROM Invoice").Count();
from quickbooks-v3-dotnet-sdk.
ExecuteIdsQuery should work for any queries.
from quickbooks-v3-dotnet-sdk.
Thank you @nimisha84 this is actually what I needed.
int count= inService.ExecuteIdsQuery("SELECT count(*) FROM Invoice").Count();
I thought Batch was the only way to execute custom queries.
from quickbooks-v3-dotnet-sdk.
Ok great. Anyways, I have fixed the SDK to return count in batch too. Will be available in 5.4 version of SDK which I releases today.
from quickbooks-v3-dotnet-sdk.
Related Issues (20)
- Missing Crypto X.509Certificate.dll Error HOT 1
- Adopt Microsoft.Extensions.* HOT 3
- Should SalesItemLineDetail have a UnitPrice property? HOT 3
- Refund Receipts and Credit Memos
- .NET Compatability HOT 1
- Connect
- Connect_tartle.co
- Remove ancillary serilog dependencies
- BinaryFormatter is used in your code HOT 1
- NuGet package no longer lists Newtonsoft.Json as a dependency, but it's still required HOT 2
- Sales Order
- Please remove Serilog dependencies
- IppDotNetSdkForQuickBooksApiV3 all nuget package versions are deprecated? HOT 2
- Please remove serilog dependencies HOT 10
- Can't add a TaxCode, URL SDK is using is incorrect
- serilog dependencies
- Unable to get the Vendor Credit applied to a bill
- Yet another problem due to serilog dependencies HOT 1
- "Invalid URI or Environment" in Blazor WASM app HOT 1
- BadRequest on SalesReceipt Add when using SalesLineItemDetail HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickbooks-v3-dotnet-sdk.