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
Ashu sharma 38Ashu sharma 38 

How to hide the fields in detailed page in lightning detailed page

Hi,

As I am trying:

Hide some fields in detailed page but that should be display in edit page.


 
Ajay K DubediAjay K Dubedi
Hi Ashu,

Out of the box you can't specify different fields for the view/edit/new page layouts. You can only specify which fields are editable/required/read-only. Some options to consider.

Record Type Switching
Since the displayed page layout is based on the profile / record type you can in effect create two layouts one for a new record which is displayed when creating a new object, and another layout for viewing and editing an existing record. When a new record is saved use workflow or process builder to change the record type.

Page Overrides
If custom development is an option you can override the new / edit / view pages for a case independently allowing you to display different fields in each scenario. This requires creating a visualforce page and/or lightning component.

Quick Actions
With quick actions you can create a specific form for creating cases. It won't override the 'New' button globally, but you can hide that where possible and replace it with your quick action. Once the record is created the fields displayed when viewing or editing would be driven by the page layout.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com