| |

Component Visibility for Page Sections

I had a LinkedIn inquiry today about how they could allow some fields on the Account record to be editable when the Account record was initially created but make them read-only later when the record has been saved.

Component Visibility for Page Sections, along with Dynamic Forms will allow us to achieve this.

Two things we need to check before we start the config:

Check the profile and permission sets of the users you want these restrictions to apply to and make sure they do not have:

  • Modify All on the object.
  • Edit Read Only Fields enabled (a system setting in a profile or permission set applied to the user)

Edit Read Only Fields:

If either of these settings are enabled, the read-only feature will not work.

Next, open an account record from your Sales App and select Edit Page from the setup gear icon.

Create two new Field Sections and drag some fields into each of them (the same set of fields into both):

Select the Editable Account Information field section and apply component visibility to the entire section. Set it to when Account Name = <no value>. This means this section will be displayed when the record is being created (new) as the Account Name has not been set yet.

Select the Component Visibility on the Read-Only Section to the opposite (when the Account Name is not blank). So when the Account Name does have a value, just display this section.

Within the Read-Only section, select each of the four fields and set the UI Behavior as Read-Only.

Next, select New to create a new Account. The Editable field section will be displayed and you will be able to enter values into the fields and then save the new account record.

Next, open an existing Account record and click the Edit button. The Read-Only Account section will be shown and the four fields will be read-only.

Component Visibility for Page Sections can provide some innovative solutions!

Mission accomplished.

Similar Posts

Leave a Reply