Loading

Limit the number of characters allowed on a standard field

Date de publication: Apr 3, 2026
Description
As and example, the Account Name field on the Account Object is 255 characters and you would like to reduce it to 80 characters.
Résolution

We cannot change the Character Limit for Standard fields however there is a workaround to restrict the limit through Validation rule.

Workaround for above Example in Salesforce Classic:

1) Click Setup | Build | Customize  | Accounts | Validation Rules.

       a) Click New and enter Rule Name and Description.
        b) Enter the Condition formula: LEN(Name) > 80
        c) Enter Error Message - Account name should not exceed 80 characters.
        d) Click Save

In the Lightning Experience:

2) Click Setup | Object Manager | Accounts | Validation Rules.
        a) Click New and enter Rule Name and Description.
        b) Enter the Condition formula: LEN(Name) > 80
        c) Enter Error Message - Account name should not exceed 80 characters.
        d) Click Save

Note:  The character limit on any other Standard field can be restricted by using the same Validation Rule, only the formula would differ based on the character limit to be restricted and the field name. The Formula for any other field would be:

LEN(FieldName) > number of characters to be restricted.


See also:
Below is the IdeaExchange link for Custom Object name field:

 Increase Name field length from 80 to 255  



 

Ressources supplémentaires


Maximum length for system 'Name' fields  

Numéro d’article de la base de connaissances

000388274

 
Chargement
Salesforce Help | Article