function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
fredregefredrege 

Disable the "Contact" edit icon in Chatter's profile page

Hi folks.  My HR department would like me to disable the edit icon (the yellow pencil) on each users' Chatter profile page  (specifically on the "Contact" information, not necessarily for the "About Me" section).  Only system administrators (or users with a particular profile) would be able to see the pencil, and edit the information in that area.

 

Has anyone done this before?  Any ideas on how to do it?  JavaScript that's read when the page loads, perhaps?

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
V100V100

Write a validation rule that prevents them from edit the record.

All Answers

cloudcodercloudcoder

It is currently not possible to modify the Chatter Profile page. 

 

With that said, the About Me section is a great way for individuals to write a little bit of personal information to add personality to their profile. I have found, within Salesforce, that I learn a lot about peoples interests, skills, etc from this section. Limiting who can update that information may inhibit this.

fredregefredrege

If you read my post, I mentioned that I don't want to limit people's ability to edit the About Me.  Just their contact information: which includes their role, manager, telephone numbers, etc. 

 

I'm wondering if there's a way to get Salesforce to read a JS file before the page loads.  In that way, I can accomplish just about anything.  Including hiding the Contact edit button.

cloudcodercloudcoder

Ah, in that case you are in luck. You can't remove the edit icon, but the field displayed in the popup are controlled by standard salesforce permissions for the User object.

 

fredregefredrege

...

fredregefredrege

But there is not "set field level security" option in the User object.  :(

fredregefredrege

And even from Setup | Manage Users | Profiles, there are no field level security option for the User object once I select a profile. 

cloudcodercloudcoder

You are right. Sorry, I forgot the User object is different

 

 

V100V100

Write a validation rule that prevents them from edit the record.

This was selected as the best answer
fredregefredrege

I have no idea why I didn't think of that!  It works!

 

Here's the validation rule that I applied to the User object:

 

AND(
ISCHANGED( Title ),
$User.Username <> 'myusername@myorg.com'
)

 

Then I placed the error location just below the title field.

 

Of course, you can add more authorized usernames, or better yet, use an authorized profile. 

 

Thanks, V100!