Anyone aware of a way to limit the result set returned by the API in a search to X results?
Announcement
Collapse
No announcement yet.
API - Limit the result set to X results?
Collapse
X
-
Mike C
- 41
API - Limit the result set to X results?
-
Support Team
- 7556
Re: API - Limit the result set to X results?
By default the query object returns up to 100 records. In case you want to fetch more records you can simply change that default during object creation.
You need more and therefore you should create the object differently with specifying the max number of records you want to fetch, please use a reasonable number unlike a very high number that will reduce efficiency.
You need to add another parameter:
For example, in the C# sample, we have the following:
RangerMSP.ObjectQuery<RangerMSP.Account> accountSearch = new RangerMSP.ObjectQuery<RangerMSP.Account>();
RangerMSP.ObjectQuery<RangerMSP.Account> accountSearch = new RangerMSP.ObjectQuery<RangerMSP.Account>(RangerMSP .LinkEnum.linkAND, 500);
Hope this helps!
-
Mike C
- 41
Re: API - Limit the result set to X results?
I believe so:
VB:
Dim ticketSearch As New CommitCRM.ObjectQuery(Of CommitCRM.Ticket)(LinkEnum.linkOR, 50)
Comment
-
Mike C
- 41
Re: API - Limit the result set to X results?
This portion is working great now. There are a few hiccups, but working on it.
Thanks
Comment
-
vinayaksharma85
- 1
Re: API - Limit the result set to X results?
As we have never really done this I was hoping to get some examples of how others go through their processes
Comment
Comment