0
votes

I wanted to display a custom field as Read-Only on the Edit page ONLY of a custom object. This field should be hidden on the detail page. I tried wrapping the field in a section and display the section in Edit Page only(Page layout editor). That didn't work. I don't want to create a custom visual force page for the EDIT Page. Please suggest.

Thanks Kumar

1

1 Answers

0
votes

Unfortunately, there's no way to put a field on just edit or just detail. It's both or neither.

You have two options, custom Visualforce page as an Edit override is the easiest one, but if you want to leave the page layout editor as something useful to admins, there's also a very hacky option...

Create two record types, one that displays the field and one that doesn't. Create a new button that launches a Flow (with a return URL of the edit page for that object). The Flow should change the object's recordtype to the one that displays the field. Additionally, create a Process or trigger that changes the recordtype back to the one that does not display the trigger after you save the object.

I definitely recommend the VF page...