In this example https://www.youtube.com/watch?v=QrtVN8vZGJU you can see that “Jim Smith” is going through the de-activation process . What i want to do, is when you press save, an apex trigger is triggered and automatically re-assigns “Jim Smith” Leads into this appropriate manager

Having a quick look, it looks like I can create a trigger on the User object. However i am new to this, so i may be mistaken

Looking for any help/advice

Regards D


Yes, you can create triggers on the User object.

Also from Winter 14 you can create workflow rules and actions on User too.

Create a User trigger by going to Setup | Customize | Users | Triggers

User trigger

  • Thank you for your suggestion. Do you know where i can find a dummy guide to writing the apex code i need for the following ? – Masond3 Sep 23 '13 at 10:25
  • You can look at the quickstart coding guide salesforce.com/us/developer/docs/apexcode/Content/… – Doug B Sep 23 '13 at 10:29
  • Hi Thank you for the link. I do have one question , what would my trigger execute on ? would it be when the records are updated ? – Masond3 Sep 23 '13 at 10:33
  • I would imagine for your scenario you would want a trigger on User object, before update, and looking for records where isActive is changing from true to false – Doug B Sep 23 '13 at 10:39
  • I would argue AFTER UPDATE, to ensure that the de-activation succeeded. – Mike Chale Sep 23 '13 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.