I have checked the question here: What is the best way to retrieve random item?
But I found an other possible solution here:
Can someone explain how this will work?
I tried the query, but I always receive the same item and not all the fields. Is this due to managed properties?
List A has, lets say 5 items. The ID's are not 1-5 due to the fact that some items have been deleted.
So the only approach I was thinking of is loop through the list and save all ID's in an array. Then the random number gets one entry from the array. Kind of what Supriyo SB Chatterjee is saying in the other question.
I don't know how to do the approach from Yuri Leontyev in the question.
So I hope someone can get my on to the right track here. Every response will be appreciated.