+ Start a Discussion
Tracy Flieder 9Tracy Flieder 9 

Auto populate Opportunity owner field with manager when User (original Opty owner) is de-activated.

When a User record is deactivated, we need to auto-populate any existing Opty records with their active manager (as noted in the user record), so those Opty records always have an active owner and are not sitting in limbo with a de-active user.  We want to automate this process.  
Any suggestions on best approach? 
Thank you, 
Best Answer chosen by Tracy Flieder 9

Create a Trigger on User object and check if User is de-activated then get all the open opportunities on which this User is a owner and then update the opportunity owner from this User to user's Manager User.

Hope this helps...!!

Please mark as best answer if the above help..!!!