default limit for xdata get opeations

Hi,
is it possible to give default value for $top in every list entities operations?
I don't won't anyone trying to fetch 120k products with single operation by accident.

You can use Server Event OnEntityList eg:

  if Args.Criteria.MaxRows<0 then // no $top was present
    Args.Criteria.Take(20); // bring only 20 records (default $top)

HTH

3 Likes

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.