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
do I file bugs somewhere else? Through support?
Yes, that is that official channel to report bugs and other issues. However I can file a bug for this.
let me know if I need to do something / you need additional info.
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.
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.