You need to sign in to do that
Don't have an account?
validation rule modifying a custom field
I would like to take a custom check box field "requirements spec sheet reviewed by engineer" only modifyable by certain users. I cannot seem to find any literature on creating a validation rule where i can list out specified users that should have access to modifying that field and the salesforce general examples dont even pass a syntax check.
My goal for this is that i dont want the field to be able to be selected by any user as it is a gatekeeper field. I only want administrators and engineers able to check off this box.
Is this possible the way i am looking to do it?
Thanks!
Thanks for the help! That worked like a charm. For those of you that may be looking to do the same thing (make a field restricted to certain users by last name) here is what i modified to code to read:
All Answers
You could write a VR that only allows certian User ID's to edit the field, but you're much better off using the Field Accessability Settings and Field Level Security for this
About Field Accessibility
AND
“Manage Users”
Several factors help control whether users can view and edit specific fields in Salesforce.
After setting these items, you can confirm users’ access to specific fields using the field accessibility grid.
Setting Field-Level Security
The fields that users see on detail and edit pages are a combination of page layouts and field-level security settings. The most restrictive field access settings of the two always apply. For example, if a field is required in the page layout and read only in the field-level security settings, the field-level security overrides the page layout and the field will be read only for the user.
ImportantYou can define field-level security for multiple fields on a single profile or for a single field on all profiles.
Setting Access for Fields on a Single Profle
The relationship group wizard allows you to create and edit relationship groups regardless of field-level security. For more information on the behaviors of relationship group members, see Relationship Group Considerations.
Setting Access for a Single Field on All Profiles
https://na1.salesforce.com/help/doc/en/salesforce_pagelayouts_cheatsheet.pdf
The reason i am seeking out using a validation rule is because we are only running professional edition, field level security doesnt really start hitting home until enterprise edition.
Ugh! I wish you had mentioned that you were on PE up front that would have saved a bit of trouble.
my apologies
Okay here's a VR you can borrow and hack. This one prevents anyone except Admins from changing the Account.Name.
Thanks for the help! That worked like a charm. For those of you that may be looking to do the same thing (make a field restricted to certain users by last name) here is what i modified to code to read:
A word of advice, I would avoid using $User.LastName like you are in your VR. You might be better off creating a custom field on the user object (like a checkbox or picklist) that indicates that they can edit that field. And then refer to that in your VR
this is a very good point... thanks again for the help! I will go adjust, that will make things easier going forward!
the formula now reads:
and the field was inserted as a check box at the user level. Thanks for the advice! works perfectly
No problem, you owe me a beer!
I will ship one in the mail, it might get warm and shook up a bit though! Caution upon opening... ha!
You live in the boston area? I will be there in 5 days, I can hand deliver :-) haha!
I am trying to write this validation rule that allows account managers and system administrators to edit a checkbox field. This is what I have so far. The checkbox field is called "extsys_kb_access__c". The rule is still restricting system admins to edit, but allowing account managers to edit.
Here is the rule, let me know if you can help!
AND(
ISCHANGED(extsys_kb_access__c ),
NOT($UserRole.Name = "AirWatch Account Mgr"), ($Profile.Name = "System Administrator"))
Thanks!