-1

I have a need to have users be able to change a Priority but only if its being upgraded. Our priorities are P1 P2 P3 P4

I don't want certain users to be able to move a case from a P1 down to a P4, but I DO want them to be able to move a P4 up to a P1. How would I accomplish this?

1
  • 1
    What have you tried? Where are you stuck? Please edit your question to include that. Even if it doesn't work, it can help people write more tailored answers.
    – Derek F
    Commented Dec 13, 2023 at 19:45

2 Answers 2

1

You can check the old and new values of the Priority field and prevent the users from changing the priority to a lower value.

You can use something like this in your validation rule formula:

AND(
    ISCHANGED(Priority),
    CASE(Priority,
         "P1", 1,
         "P2", 2,
         "P3", 3,
         "P4", 4,
         0) <
    CASE(PRIORVALUE(Priority),
         "P1", 1,
         "P2", 2,
         "P3", 3,
         "P4", 4,
         0)
)

This formula will evaluate to true if the Priority field is changed and the new value is lower than the old value, based on the numerical order of the priorities. You can also add a custom error message to inform the users why they cannot change the priority to a lower value.

1

Starting with a Custom Permission that you can assign to profiles/permission sets, your validation rule would be:

AND(
  NOT($Permission.Can_Downgrade_Priority),
  CASE(Priority__c,
    "P1", 1,
    "P2", 2,
    "P3", 3,
    "P4", 4, 0
  ) >
  CASE(PRIORVALUE(Priority__c),
    "P1", 1,
    "P2", 2,
    "P3", 3,
    "P4", 4, 0
  )
)

This will throw an error if they don't have permission, and if the new priority is higher than the old priority.

Not the answer you're looking for? Browse other questions tagged .