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
Sridhar Arumugam 9Sridhar Arumugam 9 

How to hide standard fields based on record type?

For example,
I am having 2 record types,
1. Production
2.Testing

I want to hide the standard field for "Testing" record type.
Sunil RathoreSunil Rathore
Hi Sridhar,

You have to create different page layouts for each record type. Please follow the following steps to create new page layouts and edit them.
and edit them:
  1. Click on the set menu from the Gear Icon on the right top of the screen and select Object Manager.
  2. Select the respective object from the list of the object.
  3. From the left side panel select Page Layout
  4. Click on the arrow at the right side of the particular page layout you are using / Click on the New button to create a new page layout.
  5. Select edit page for an existing page.
  6. Remove all the fields which you want to remove.
  7. Save the page layout.
Now Select Record type from the left side panel and follow the following steps:
  1. Click on Page layout assignment
  2. Then click edit Assignment.
  3. Then click on the assign page layout.
  4. Select particular page layouts for the respective record type.
  5. Click Save.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Sunil Rathore
 
Ajay K DubediAjay K Dubedi
Hi Sridhar,

Yes. That is exactly how to use record types and Profiles. You can specify in a Profile (or Permission Set), which fields are visible to members of the Profile or Permission Set. I keep mentioning Permission Sets since users can belong to multiple Permission Sets, so you can more easily use them to associate permissions than Profiles. 

Record types are used to control page layouts.  Note, though, that you won't need to use a separate page layout just to "not have" the field on it if you use Profiles and Permission Sets to limit visibility to the field.  If a User can't see the field, they won't even see where it is supposed to be on the page layout.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
www.ajaydubedi.com