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
alexsummersalexsummers 

Custom fields view as Read Only in SF UI

Good Day!

Is there a way to view custom fields in the salesforce UI as Read Only without modifying the profile settings...

My external app uses the user's session id to perform operations on Salesforce data

including the update of a custom field:

the custom field is like - Last processed date  (timestamp when my app was last run by the user)

However I want this to be read only when viewed in the Salesforce UI

Am I correct in thinking that if I set the custom field to "read only" for the user's profile he will see the field as read only in the Salesforce UI and he also cannot update my custom field?

Thanks! I would appreciate any suggestions

Message Edited by alexsummers on 05-18-2005 03:29 PM

darozdaroz
There are two places where a field can be marked Read Only...

First is in the Page Layout, and second is the Field Level Security (Enterprise Only I believe). The more restrictive of the two applies.

Since you need them to be able to edit the field from the API you need to leave FLS NOT readonly. Then what you need to do is modify the Page Layout(s) to make the field read only there. It will have the effect you're looking for.
martsmarts

Hi,

When I did this to my custom fields (i.e. Page Layout read-only, FLS non-read-only), I noticed that non-Admin users can see it in the Edit page as read-only, but Admin users still see it as updateable fields.  Is it possible for the Admin to see it as read-only, or is it part of the SFDC design?

Thanks in advance!

darozdaroz
There's an admin privledge stores as part of the Role that grants "Edit all Fields" (or something to that effect). What I did was create another 'admin' role based off the standard role and remove that privledge.