You need to sign in to do that
Don't have an account?
NisseKnudsen
Create User via Apex
Hello Community!
I'm encountering the problem that I need to create on every org with my app two dummy users as a placeholder. Since I got a first-start-apex-controller I would like to integrate the creation of User in it. But I can't use the User-Object because of read-only-permission, as Eclipse says to me.
So does anyone know how to do this?
Thanks a lot and Best Regards
Nisse
Hi,
You can create users via apex. There are certain object which doesnot support DML operation and user object isn't one of them. You can check "sObjects That Do Not Support DML Operations" for more details.
Only thing to be considered is that you cannot insert setup and non set up objects toggether.
Thanks,
Ahmed
Hello Ahmed!
Thanks for your answer!
I thought there might be a problem, that I didn't set all the required fields for creating a new user and that's why it gave me the error msg.
I'll give it a try in near future and will post my solution later on!
Cheers
Nisse
Hi !! Can any one tell me how can I create a user(chatter only) with apex code in my web site and , I don't know if Guest profile permissions allow that ?