Search code examples
paginationodatadynamics-crm-2011dynamics-crm

Is $top supposed to be murdering odata.nextlink?


I'm attempting to access the odata api in a Microsoft CRM 2011 product. It's working mostly as expected, except that if $top is used then odata.nextlink goes missing. This means that it's impossible to set the paging to some user-defined value (it looks like it's default to paging at 50 anyway, but given the nature of the data they were wanting 5/10/25). The odata.nextlink value is present as long as $top isn't used.

Is this some idiosyncrasy of CRM 2011? Has it somehow been configured to behave this way? I'm just a developer (maintainer, really) trying to make use of the API, I have zero experience with Dynamics and only found out recently that it was the framework for this software (or that there was such a thing as Dynamics).


Solution

  • According to the documentation this is expected. Perhaps you should filter client side in this situation.

    $top

    Determines a maximum number of records to return.

    If you are retrieving additional sets of data using the next link you should not change the $top query option value because this will cause unpredictable results.