Print this page

Fix capitalization for Account Name

Knowledge Article Number 000205622
Description How to fix capitalization for Account Name?
Resolution
1. Create a Workflow rule on the Account object where the evaluation criteria is set to "Evaluate the rule when a record is created, and every time it’s edited" and the rule criteria is set to "Account: Created By not equal to null.
2. Create a field update action to update the field Account: Account Name.
3. Enter the formula value as:
IF(
FIND(" ", Name ,1)=0,
UPPER(LEFT(Name ,1))&MID(Name ,2,100),
IF(
FIND(" ",MID(Name ,FIND(" ",Name ,1)+1,LEN(Name )-FIND(" ",Name ,1)))=0,
UPPER(LEFT(Name ,1))&
MID(Name ,2,FIND(" ",Name ,1)-1)&" "&
UPPER(MID(Name ,FIND(" ",Name ,1)+1,1))&
MID(Name ,FIND(" ",Name ,1)+2,100),
UPPER(LEFT(Name ,1))&
MID(Name ,2,FIND(" ",Name ,1)-1)&" "&
UPPER(MID(Name ,FIND(" ",Name ,1)+1,1))&
MID(Name ,FIND(" ",Name ,1)+2,FIND(" ",MID(Name ,FIND(" ",Name ,1)+1,LEN(Name )-FIND(" ",Name ,1)))-1)&
UPPER(MID(Name ,FIND(" ",MID(Name ,FIND(" ",Name ,1)+1,LEN(Name )-FIND(" ",Name ,1)))+FIND(" ",Name ,1)+1,1))&
MID(Name ,FIND(" ",MID(Name ,FIND(" ",Name ,1)+1,LEN(Name )-FIND(" ",Name ,1)))+FIND(" ",Name ,1)+2,100)))

4. Click Save.
5. Activate your Workflow.

To Test: Create a test Account record with 2 -3 strings in all lower case letters. (example: salesforce test account). After saving, the Account name will be set as Salesforce Test Account.

Note: This will work only when the account name is 3 words or less with no hyphenated word




promote demote