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
ahonahon 

how to prevent record update or editing based on a condition

If picklist field status = VOID, then user cannot update or edit record.

I keep running into a solution where a validation rule or flow prevents user from updating picklist to void. This is not the requirement. The requirement is once the status is already changed to VOID and the record is saved, then no further updates or edits can be made.
Best Answer chosen by ahon
VinayVinay (Salesforce Developers) 
Hi Ahon,

You can try below validation rule.
AND(
NOT(ISNEW()), 
ISPICKVAL(PRIORVALUE(status),"VOID")
)
Please mark as Best Answer if above information was helpful.

Important Update - last chance

Heads up — this is your last chance to get your Trailblazer account set up and connected to your forums discussions on this site.Please take these steps before November 30, 2023, 11:59 p.m. PT to ensure your contributions follow you to the Trailblazer Community:
  1. If you’re not already a member of the Trailblazer Communitysign up for a Trailblazer account using the same login email address associated with your Developer Discussion Forums account. This is crucial.
  2. If you already have a Trailblazer account, and it’s using a different email address from your Developer Discussion Forums account, we recommend that you log in to the Trailblazer Community and connect your forums email address to your Trailblazer account.
Find more info & support
We know that moving platforms can be a hassle, so we created a special forums users group, the Migration Support Hub, in the Trailblazer Community where you can find other forums users and get training videos, the latest information, and assistance.We want to thank you for all of your time, energy, and contributions made here in the Salesforce Discussion Forums.
We’ll see you in the Trailblazer Community!

Thanks,