I'd like to be able to set different permissions for the same user depending on whether they're accessing/editing a resource in the UI or via the REST API. For example, they'd be able to edit a custom field when via the API but only have read-access in the UI. Is this possible?

I'm considering creating an apex class that can be hit via the REST API and locked down with permissions but it seems a waste considering I just want to perform CRUD actions on some standard resources.

Any suggestions would be greatly appreciated.

1 Answer 1


If from UI means salesforce UI then you can set field access on page layout... You can go to page layout ... Hover over field and click on settings.. enter image description here

And then click read only

enter image description here

Then save the layout.

  • Thanks, this should help with most fields. However some of the fields are required and they're not selectable as read-only. Is there any way around this? Sep 25, 2019 at 12:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .