We are required to deactivate a user account that owns so many flows, triggers, and classes in his name. What is the best way to get all metadata owned by him and then transfer to another admin? I tried this query in Developer console for flows but ended with an error. SELECT Id, DeveloperName, CreatedBy.Name, LastModifiedBy.Name FROM FlowDefinition Please advice.
1 Answer
Apex classes, triggers, and flows are not owned by a user. Accordingly, there is no way to "transfer" them to another user. If you want to configure who is notified when exceptions occur, you can Set up Apex Exception Email notifications. Note that there are some settings that will prevent deactivation of a user, such as being the Default Workflow User. Attempting to deactivate a user who is one of these settings will identify the setting that is preventing deactivation.
-
So, if someone develops APEX Triggers or Classes and leaves the company. There won't be any issue in running those triggers and classes created by is a deactivated user? I know we can do a Save As new flow by the active admin for flows.– GathiCommented Jul 22 at 12:08
-
@Gathi Correct. There is a long list of things you do need to worry about (see Considerations for Deactivating Users), but automations are mostly not a problem.– sfdcfox ♦Commented Jul 22 at 12:53