How to do it...

Carry out the following steps to create a validation rule to prevent non-system administrators from changing the name of an account record:

  1. Click on the Setup gear icon in the top right-hand corner of the main Home page, as shown in the following screenshot:
  1. Click on Setup, as shown in the following screenshot:
  1. Navigate to the Account Validations Rule setup page by clicking the following: Objects and Fields | Object Manager | Account | Validation Rules.

Locate the Validation Rules section on the right of the page.

  1. Click on New.

You will be presented with the Account Validation Rule Edit page.

  1. Type Admins Only to Update Name in the Field Label textbox.

Upon clicking out of the textbox, the name changes to Admins_Only_to_Update_Name.

  1. Leave the Active checkbox checked.
  2. Optionally, enter details in the Description field.

Locate the Error Condition Formula section positioned lower down on the page.

  1. Paste in, or enter, the following code:
AND(  

  ISCHANGED( Name ), 

  $Profile.Name <> "System Administrator" 

)
  1. In the Error Message section, enter the text Only System Administrators are allowed to change the Account Name.
  2. For the Error Location option, select Field.

You will be presented with the Field selection options list.

  1. Select the field Account Name.
  2. Finally, click on Save, as shown in the following screenshot:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset