Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

I write apex class for Delete the user records but I got an error that error shows like this

Error: Compile Error: DML operation DELETE not allowed on User at line 28 column 7 how to solve this error please let me know.

1 Answer

0 votes
by (32.1k points)
The user object isn't deletable, i.e. to "delete" a user and regain a license to use on another user you have to cripple the user by setting isActive to false. This will make its license to go back to the pool.

Browse Categories

...