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
ajay kumar 384ajay kumar 384 

Force user can not create new user ?


ajay kumar 
Force.com App Subscription not create user
hi,
I have a community and i was created user with profile  "Force.com App Subscription",

When i login to community then  we have not created new user or update user 
try{
      user user=   [Select IsActive, UserRoleId, UserRole.Name from User   where username ='distributer01@bp.com' ];
user.isactive=false;
update user;
}catch(exception e)
{
error=string.valueof(e);
}

then we getting error

System.DmlException: Update failed. First exception on row 0 with id 0051D000000JA1vQAG; first error: FIELD_INTEGRITY_EXCEPTION

Please tell me force user have permission to create or active decative user ?? we use user object
 
or give me soluion to setting force user to create user