Lock add new record

Hi!

I have a puzzle situation that I would like to get help with:

  • we have custom module DELIVERIES that we use to manage and track deliveries to our customers
  • at certain point number of delieveries for the day reach maximum (not by qty or some standard rule, but by decision of warehouse manager)
  • when above situation comes, manager should be able to lock adding new records for that day = we would like to enable lock adding new records for the module DELIVERIES that have delivery date same as locked date manager locked

I hope I managed to explain clear enough… :slight_smile:

We would highly appreciate if someone could advise how to acchieve this…

Many thanks in advance!

Regards,

Mario

If you have a security settings set up so that this depends on a role, the manager can simply change the role (to remove Edit rights), and then change it back. This is a lock for the entire module, not record-level (you could also do it record-level, leaving the roles stable, but changing security group assignments).

That is the “no code” solution.

You can make this process easier with some code, so that it’s just a button to toggle the two states.

Code would also be required to make this dependent on a field in a record (like the “date/time closed”).

Read up on security settings here:

https://www.sugaroutfitters.com/docs/securitysuite/example-of-a-typical-setup