1

I have a validation rule on the Task object. This rule prevents anyone but certain users with a permission set change the 'Assigned To' field of a task. The validation rule is:

AND(
ISCHANGED( OwnerId ),
NOT(ISNEW()),
$Permission.AllowChangeOfTaskAssignment
)

Where Owner Id is the API name for the 'Assigned To' field.

The permission set AllowChangeOfTaskAssignment is very basic and simply allows edit access on the Assigned To field of the Task object for all record types.

However, the validation rule keeps triggering, even when the permission set is assigned to users. The permission set does not require session validation.

Any hep or insight would be appreciated.

1
  • is this a permission set or a custom permission? only the latter works here. was the custom permission added to a permission set that the running user possesses
    – cropredy
    Mar 10, 2021 at 22:11

1 Answer 1

0

Validation rules fire when true, so you want to look for a situation where the user does not have the permission:

AND(
  ISCHANGED(OwnerId),
  NOT(ISNEW()),
  NOT($Permission.AllowChangeOfTaskAssignment)
)

Note that the Permission Set must have the Custom Permission assigned to it, or it will not work. Permission Sets are about assigning permissions to a user, but the $Permission property only looks at the users assigned Custom Permissions.

You must log in to answer this question.

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