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

Create User from apex code

Is it possible to create user from apex code(batch apex) and also insert the permission set  and then send an email to the user

Santhosh KumarSanthosh Kumar

I don't see why not. Did you try and got into any errors? 


Please be aware of the issue that you can perform DML on Setup object and Non-Setup object in same transaction. Search the web for more info.