Loading

Standard 'Mobile' field on User record keeps reverting to '+1' format

Julkaisupäivä: Aug 22, 2024
Kuvaus

On User object, there is a standard field called Mobile.  This field displays on User records, as well as on the User's Chatter profile.  Salesforce specifies that if a 10-digit phone number is input, the format will automatically be updated to the (###) ###-#### format. When inputting an 11-digit number, the format will be automatically updated to the +1 ########## format.
 

When specific users update their phone number to a 10-digit phone number and save, then overnight the phone number will revert back to the +1 ########## format, even though it is a 10-digit phone number.  It appears the change was made by the User themselves in the Last Modified By field on the User Record.


 

Ratkaisu

This is caused by a feature called SMS Identity Confirmation.  This feature is located in
 Setup | Security Controls | Session Settings | Enable the SMS method of identity verification

This feature cannot be disabled once it is enabled. When the phone number reverts, it does count as a record edit, and so Validation rules apply. In order to prevent the phone number from reverting to the unwanted format, you can create a validation rule as follows:

In Classic:

  1. Go to Setup | Customize | Users | Validation Rules.
  2. Click New to make a new rule.
  3. Enter a Rule name, and ensure the Active checkbox is checked.
  4. In the Error Condition Formula box, enter a formula such as the following: NOT(CONTAINS(MobilePhone,"-"))
  5. Enter an Error message, and click Save
In Lightning:
  1. Setup | Object Manager | User | Validation rule
  2. Click New to make a new rule.
  3. Enter a Rule name, and ensure the Active checkbox is checked.
  4. In the Error Condition Formula box, enter a formula such as the following: NOT(CONTAINS(MobilePhone,"-"))
  5. Enter an Error message, and click Save
This validation rule will check to ensure that any Mobile number contains a hyphen, preventing the incorrect formula for occurring.  


Related To:

Knowledge-artikkelin numero

000382646

 
Ladataan
Salesforce Help | Article