Print this page

Why am I receiving an error when I mass deactivate users with Dataloader?

Knowledge Article Number 000004425
Description

Why am I receiving an error when I mass deactivate users with Dataloader?

Resolution

When attempting to mass deactivate users using Data Loader, you may receive errors if you use the "Manager" Field. This field is a Hierarchy field (i.e. a lookup field to another User). Since a User cannot report to an inactive User, the deactivation will fail. If there are custom lookup fields back to the User object, they will need to be cleared as well. Depending on the number of users you are attempting to deactivate, the error may appear to be a connection issue. One way to test is to take a small sample and test first or try one or two in the UI.

Suggested steps to mass deactivate a large number of users in an org:

1) Export a full list of users (All Active Users) with all User Lookup Fields (Manager is a standard field)
2) Use the Data Loader Update function to clear all User References (make sure the Data Loader setting "Insert null values" is selected)
3) With the list of UserIds to be deactivated run the update to deactivate

Note: Any users that are part of Workflow or Email alerts will have to have the references removed before deactivation can occur. Any user that is used in an Administrative function (Default Lead owner, Portal Administrator, etc) cannot be deactivated. They will have to be replaced first.





promote demote