Pages

Thursday, May 7, 2015

Salesforce: Update User Manager

Manager field in User object in Salesforce is pretty special, it can be used as approver when a user submit for approval. But, when user go to their Advanced User Details, from click User Name | My Settings | PersonalAdvanced User Details, when user click Edit button Manager field is read-only.


After finding more on this field, only user with Manage Users and Manage Internal Users permission allowed to update this field. The reason behind, if users could modify this field, the concern is that they might update their manager to a friend who would approve time off request or expense charge.

In our case, for some reason and our Salesforce system is not linked to HR system, so user need to update their manager field manually for a time-period, before it locked.

Solution

1. Custom "Hierarchical Relationship" field + Workflow + Field Update
Fail, this is because Field Update on Manager do not allow to dynamically update the value from other field, only to a defined user.



2. Custom "Hierarchical Relationship" field + Process Builder + Update Records


SuccessHow this works?
1. Create a new Hierarchical Relationship custom field name "Report To" in User object
2. Make this field available in User page layout and not read-only
3. User update their own Manager through this field from Advanced User Details
4. Process Builder will update standard Manager field from "Report To"

Last message, do not forget to activate the Process :)




No comments:

Post a Comment