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
Boussad SedoudBoussad Sedoud 

Delete assignment role from user

Hi Everyone,

I would like to delete all of my Role, but there are all assign to users  (and i have a lot of users ),
so i'm trying to do an SOQL request through Workbench, but it doesn't works..
 
UPDATE User
SET UserRoleId = "NULL" 
Where UserRoleId ="NOT NULL" ;


I don't know if i need quote or not, some of you have any ideas ?

Thanks you !!


 
Niraj Kumar 9Niraj Kumar 9
Hi,

First retive the user from associated role using workbench and assign them a dummy role with help of Data Loader.
then Delete all roles.

Thank.
Niraj Kumar