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
FireballFireball 

Update SuperUser fied

I need urgent help. I'm trying to set a new value to SuperUser field of Self-Service User via Salesforce Web-service API but got the exception "Unable to create/update fields: SuperUser. Please check the security settings of this field and verify that it is read/write for your profile.". From what I could find this field seems to be unchangable at ll. Is it true? Does anybody know any ways to update SuperUser field?
 
Here is my code:
 

usr.ContactId = null;

usr.Name = null;

usr.IsActiveSpecified = true;

usr.IsActive = true;

usr.SuperUserSpecified = true;

usr.SuperUser = true;

usr.TimeZoneSidKey = timeZone;

SaveResult[] result = sp.update(new sObject[] { usr });

 

Thanks in advance

RajanJasujaRajanJasuja

click on Setup
click on object name which have SuperUser field
click on fields  link(You will get the field list)
Click on SuperUser field name
You will see a button "view Field Accessibility" click on that
Check the field must be editable

If it is not change it to “Editable”.

Save and try you will not get the error.



Rajan Jasuja


 

FireballFireball
Thanks for your reply Rajan,
 
But Self-Service User object doesn't have "Fields" link in Setup.
So I cannot check or modify Field Accessability for SuperUser field.
I tried to do this via Setup>>Manage Users>>Profiles>>[edit admin profile] but I couldn't find Self-Service user object as well...
 
Any other ideas?
 
Thanks in advance
SuperfellSuperfell
You cannot programatically change the superUser flag, sorry.
prbprb

Are there any suggestions for how to update this field?  Is the field locked down via APEX triggers as well?

I have over 850 users I need to set this for and I need to automate the operation somehow.