function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CloudyNKCloudyNK 

Write a trigger to reduce priority field on custom object?

I want to write a trigger so that once a status of my object changed from high to low priority field shoud be updated by Null and all the records which has peiority greater than the current record should be decreased by 1. 
Colin KenworthyColin Kenworthy
"and all the records which has peiority greater than the current record"
How many records do estimate, you may need a batch or queueable if it is thousands of records.
CloudyNKCloudyNK
Hi Colin,
Currently we have 3000 records it will be increase in future.