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

Track Role hierarchy Changes

Hi All,


i need to track role hierarchy changees.



A and B are Sales Managers, here X is reporting to A and Y is reporting to B for some period.

later my Role hierarchy is changed like, now Y is reporting to A and X is reporting to B.


Then i want to track these changes on role hierarchy.


is this possible to track in salesforce.




Cerified Developer


Add a trigger to User object and track the changes on the UserRoleId field .


Or Add history tracking to this field


Hi Abhishek,

Thanks for our reply,

First Salesforce don't have setHistoryTracking on User Fields.

Second One if you write a trigger on User Object, while changing it's not calling UserRole Object internally to update. i.e, while changing Role Hierarchy it's not showing any updates(No Record) in Debuging Log.