[SalesForce] How to restrict user from assigning task to one specific profile users
I want to restrict users from assigning tasks to a group of user belong to one profile.How can I do that?
Best Answer
You can do it for example with a validation rule (read about them in your help&training). We try to push into asking a good question that shows some research effort and discourage "plz send me teh codez / do the homework for me").
A validation rule on Task object with error formula similar to
Owner:User.Profile.Name = 'System Administrator'
should do the trick?
Notes:
In the formula editor you'll have to look for the field label ("Assigned To", not "Owner")
Up till Summer'13 release we had hard time doing that because Calendar could be also the task "owner"
It says this in the Summer 13 release notes:
"When your organization has Communities enabled, User Sharing lets you control which other users Community members can see. You can control community members’ access to both internal and external users."
But it sounds like there might be an option without communities:
User Sharing for internal users is also available through a pilot program. For more information on enabling User Sharing for internal users, contact salesforce.com.
Create permission set P1 with record type R1 only assigned to it
Create permission set P2 with record type R2 only assigned to it
Add P1 or P2 to the appropriate Users
Ensure R1 and R2 are not set on the profile, leaving just the Master record type selected there
Then when the SObject is created it is automatically given the record type according to the permission set of the user (with no record type selection prompt) which is the behaviour I believe you want.
Best Answer
You can do it for example with a validation rule (read about them in your help&training). We try to push into asking a good question that shows some research effort and discourage "plz send me teh codez / do the homework for me").
A validation rule on Task object with error formula similar to
should do the trick?
Notes: