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
AbAb 

transferring Inactive users to a specific profile

Hello,

I want to transfer all the Inactive user to a Profile called "Inactive users", I want to use an Apex code or Data loader to do so ?

How can i implement it ?
Best Answer chosen by Ab
JLA.ovhJLA.ovh
1/ Identify the Id of yourprofile : display the profile page and retrieve the profileId from the Url
2/ Using Dataloader, you export user records (Id,ProfileId) with following criteria : where ProfileId<>'YourProfileIdHere' and isActive=false
3/ Use Excel to change value from the ProfileId column and put your ProfileId in it, then save the .csv file
4/ Run Datalaoder to do an update on User records, using the updated csv file