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

Vote:
 

Hello,

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.

Example:

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,

bob

#179854
Jun 23, 2017 10:48
Vote:
 

Hello,

do I file bugs somewhere else? Through support?

Kind regards,

#182377
Sep 17, 2017 14:33
Vote:
 

Hi,

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

#182381
Sep 17, 2017 16:57
Vote:
 

Thanks,

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

bye

#182396
Sep 18, 2017 12:17
Vote:
 

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. 

#182401
Sep 18, 2017 13:51
Vote:
 

Hey,

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.

#182404
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.