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
Kim Yu NgKim Yu Ng 

Custom field data changes restricted to api only

Is there anyway to restrict read-only on a custom field (eg. number/checkbox type) when using through browser but allow changes to be made for that field through API itself?

Thanks!
Daniel BallingerDaniel Ballinger
It would probably be easiest here to create a new user record that access the API. Then the profile assigned to that user could have read/write access to the fields in question. All other profiles could have read only access.

This way you can use Salesforces built in field level security to determine if the field can be changed or not.
Kim Yu NgKim Yu Ng

So, just for clarification, does that mean if I create a custom field for read-only access and the value will be populated by using formula such as CHECKBOX( another custom field that has read/write access but not visible thru UI )? I would then update value thru the one that has read/write with api call.