+ Start a Discussion
Praveen P 32Praveen P 32 

How to get unique names in account object records?

Alba RivasAlba Rivas

You could create a new text field (eg: Account Name Copy) and set it as unique. Then create a workflow rule that copies account.Name to your new field each time a record is created or edited.

As explained here: https://developer.salesforce.com/forums/?id=906F00000008jKdIAI


Amit Chaudhary 8Amit Chaudhary 8
For Same Idea is posted you can vote
1) https://success.salesforce.com/ideaview?id=08730000000BqCTAA0
2) https://success.salesforce.com/ideaView?id=08730000000Bqct

Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F00000008jKdIAI
2) https://success.salesforce.com/answers?id=90630000000i37zAAA
3) https://success.salesforce.com/answers?id=90630000000huZbAAI

Here you go:

At first let us create a new Field on the Account object.

1. Go to Setup | Customize | Accounts | Fields.
2. Scroll down to Custom Fields & Relationships Section.
3. Click New Field.
4. Select the Type as: Text
5. Name it as: Account Name Dupe Check[Account_Name_Dupe_Check, 255].
6. Check the Option: Unique and also select: 'Treat "ABC" and "abc" as different values (case sensitive)'.
7. Make it Visible for the appropriate Profiles. While you make them Visible also check the Option: 'Read Only'.
8. You need not put them on the Page Layouts.

Now, let us create a new Workflow Rule[Account Dupe Check].

1. Go to Setup | Create | Workflows & Approvals | Workflow Rules.
2. Click New Rule.
3. Select the Object: Account
4. Evaluation Criteria: created and every time it's edited.
5. Rule Criteria: formula evaluates to true.


6. Save & Next.
7. From under Immediate Actions, click Add Workflow Action to select 'Field Update'[Set the Account Name].
8. Select the Field to Update: Account Name Dupe Check
9. Select: Use a formula to set the new value
10. In the formula box, type in 'Name'.
11. Click Save.
12. Click Done.
13. Activate the WFR.

Let us know if this will help you