Try our conversational search powered by Generative AI!

OrderContext.Current.FindPurchaseOrders - no totalrecords when StartingRecord exceeds actual total records.



I think there is a bug with the totalrecords count.

When you're pointer (starting record) is behind the last record, you'll receive 0 for total records. So for the caller there is no way to know if the input is wrong or if there are no records.


In the case there are 17 purchase orders.

Calling FindPurchaseOrders with
  OrderSearchOptions.RecordsToRetrieve = 5
  OrderSearchOptions.StartingRecord= 15

returns: 2 records, 17 total records

Calling FindPurchaseOrders with
  OrderSearchOptions.RecordsToRetrieve = 5
  OrderSearchOptions.StartingRecord= 20

returns: 0 records, 0 total records

Kind regards,


Jun 23, 2017 10:48


do I file bugs somewhere else? Through support?

Kind regards,

Sep 17, 2017 14:33


Yes, that is that official channel to report bugs and other issues. However I can file a bug for this. 

Sep 17, 2017 16:57


let me know if I need to do something / you need additional info.


Sep 18, 2017 12:17

No, thanks - we have what is needed now.

However if the fix turns out to be complicated, or has performance penalty, this might be closed as won't fix. i.e. yes we acknowledge this is a less than desirable behavior, however the "correct" way to use APIs is to start with StartingRecord = 0 to get the total number, and use that for subsequence calls. 

Sep 18, 2017 13:51


problem is that I use this api to expose orders through our api, and the caller can request page # at any time. So iterating is not really an option.

I communicated the limitation and for the moment it's not a problem.

Sep 18, 2017 14:01
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.