Exclude External Users from User Lookup Fields (Lightning Only)

Salesforce has made the decision to allow all Users to be visible in UserClosed Look Up fields in Lightning (in Salesforce Classic, External Users are excluded).

This article offers a workaround to this issue that requires some simple configuration that System Administrators can easily implement in their Orgs. This article uses the User Lookup fields on the Closing ReportClosed as a an example, but the same solution can be applied to any Object.

Configuration Steps

You need to create a Validation Rule for each User lookup field.

  1. Go to Setup > Object Manager > Closing Report > Validation Rules
  2. Click on New
  3. In the new Validation Rule Edit page, enter the following

This will result in users getting a data validation error when saving the Closing Report if they have selected an External User in one of the Profit Split / Credit fields (the ‘Job Credit’ field, in our example)