Filter more than 5000 records

Certified Associate Developer

I have a record type which contains about 45000 records. I need to build a dropdown that shows all 45000 records but maximum limit in batchsize in queryRecordType() function is 5000. How can I display 45000 records in a dropdown list?

  Discussion posts and replies are publicly visible