Hello,
I have a use case where I need to create a process model scheduler to send notifications to users whenever a Network Milestone is updated. This process model is scheduled to run daily.
I have designed the process model and used queryRecordType() to fetch the required data. However, I’m facing a challenge since queryRecordType() can retrieve only 5,000 records at a time, but my dataset exceeds this limit.
queryRecordType()
Could you please suggest how I can handle this scenario in the process model to fetch all records?
Thanks,
Discussion posts and replies are publicly visible
To handle more than 5,000 records, implement pagination using a loop in your process model. Create a looping subprocess that calls queryRecordType() with pagingInfo, starting at index 1 with a batchSize of 5000. After each query, increment the startIndex by 5000 and continue until no more records exist. Process each batch within the loop for notifications. Alternatively, For daily notifications on updated milestones, don't use pagination. Instead, filter your queryRecordType() by lastModifiedDate >= now() - intervalds(1, 0, 0) to only fetch records changed in the last 24 hours. This is more efficient and likely stays under 5,000 records.