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

Trigger On UserRole


Hello Board,


Can we write Trigger on UserRole object?







I don’t think you can write a trigger on user role object but you can make SOQL query on this object.


For more details please go through the link below:


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

Nazrul AminNazrul Amin
Hi, I dont believe the above question got answered.  I am in a similar position.

We are creating an additional custom object X to hold additional details for UserRoles.  We need a trigger on the UserRole object to add/update/delete a record on X, each time and add/update/delete happens on the UserRoles object. 

Please can you assist with any details on how to do this?

Elad Kaplan 3Elad Kaplan 3
Unforttunately, UserRole update dosen't execute any trigger.

Only workaround I can offer is to run a scheduler to check if a change was made on it.