There is an Standard Object is Account. I need to not allowed a duplicate Account Name Object. I know the Custom Object to handled but I need to Standard Object.

  • Ramesh, please try to find tags related to your questions, or explain why the tags you select are related to your question. This will help you get the right people attracted to your question ! Dec 30, 2013 at 14:46

2 Answers 2


You can add a before insert trigger on Account which will check if same name exists then would not allow insertion.

  • I don't want use the Trigger.Do you have any better idea? like formula/validation rules. Dec 30, 2013 at 13:09
  • 4
    @Ramesh Its not possible through formula or validations as requires access to previous records. Dec 30, 2013 at 14:00
  • 1
    But you can use a simple workflow rule to achieve this task.
    – sfdcfox
    Dec 30, 2013 at 14:32

You can do this with a workflow rule, as follows:

  1. Create a custom field (e.g. Unique Account Name). It should be a text field, hidden from all layouts and field level security, and marked as a unique index (case insensitive), with a length of at least 80.

  2. Create a workflow rule on Accounts that evaluates each time the record is saved or edited, using a formula of "TRUE" (i.e. it will always run when an account is saved).

  3. Add a workflow field update to the workflow rule that copies the value of the account name into the field Unique Account Name.

  4. Activate this workflow rule.

  5. Perform a data loader operation once against all accounts to populate account names.

This setup will cause the system to use unique index validation, and when a duplicate name is encountered, the user will receive a standard error.

  • Can you explain this where I am create workflow rule.Please navigate to me.. Dec 30, 2013 at 15:43
  • @Ramesh Setup > Create > Workflow & Approvals > Workflow Rules.
    – sfdcfox
    Dec 30, 2013 at 15:57

Not the answer you're looking for? Browse other questions tagged .