0

I am trying to create a user as below,

User u = new User();
u.Username = userName;
u.Email = email;
u.firstName = firstName;
u.lastName = lastName;
u.CommunityNickname = communityNickname;
u.ProfileId = MyUtil.getProfileId();

but i am getting error at last line as below,

System.SObjectException: Field is not writeable: User.ProfileId

1 Answer 1

3

This sounds very much like a permissions issue to me.

There are a couple of things to check here:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .