1

I am having a section in Person account page layout which contains three fields. In account record page I can able to see that section and also while creating new account also I cam able to see. But I want to hide that section in Record detail page alone and it has to be shown during new account creation.

I can go for different page layout but how to assign one for record page and one for new action creation?

When I delete that section in page layout its not showing in both the places.

1
  • Have you checked the approach mentioned in this SFSE link. – Saroj Bera May 12 at 9:13
0

For any custom objects, you can use dynamic form here and apply the following approach.

  1. Create a checkbox and keep it unchecked in the beginning. Upon record save you can make this checkbox to true via a process builder or trigger depending upon the complexity of org.
  2. On the lighting page enable dynamic form and hide the section when this checkbox is set to true.

For Standard Objects, "Dynamic Forms" are not available, so you need to use record type to switch the layout and that will change the fields.

  1. Create two record types for the object. Use first record type default for the creation and once the record is saved update the record type to second using a process builder or trigger depending upon the complexity of org.
  2. Assign different page layouts to both the record types and remove the fields from the page layout associated with the second record type.

Note - With this solution, the section will only appear during record creation and not when you subsequently edit the record after creation.

2
  • as of V51, Dynamic Forms work only on custom objects – cropredy May 13 at 0:33
  • You can leverage Record Types to switch the layout in such a scenario. I'll update my answer. – Nishant Singh Panwar May 14 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.