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.
2 Answers
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
You can do this with a workflow rule, as follows:
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.
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).
Add a workflow field update to the workflow rule that copies the value of the account name into the field Unique Account Name.
Activate this workflow rule.
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
-