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
Sean Williams 21Sean Williams 21 


I have a requirement to scrub a users photo when they leave the company.  Unfortunately, both of the fields that hold the photo are read only, and i get error "Field is not writeable" from APEX code when i  refer to them.
Also - i cannot clear them manually using APEX data loader as they do not appear in the field listing for the USER object.  
So - i cannot update these either programatically nor manually using dataloader.

Does anyone know of a way i can do this?  Users without a photo have a value in the url path of 005 which is what i want to update these to for leavers.

I think your profile don't have access on those fields that's why you are facing this issue.

Ashlekh Gera
Sean Williams 21Sean Williams 21
No - i dont think so.  I am logged in as system admin.  If you look under the security profile for object USER the standard fields do not appear anyway, so its not possible as far as i can see to control access to them at profile level.
Deepak GerianiDeepak Geriani


Can you update the field from readonly to editable?  under the field level secuirty after that you can update the fields value manully ore using apex 
but if you cannot do so then you will not be able to update that field value.

please let me know if you have any issue and if you solved your issue then please maked it as solved