+ Start a Discussion
Ajay Kumar 583Ajay Kumar 583 

validation rule How to  make sure no two Opportunities have same Name.

Hi,
Using validation rule How to  make sure no two Opportunities have same Name. 
Rule will throw error only if “Some Field” field “value” is checked to false.
And able to control email sending behaviour based on User/Profile.

Thanks,
Aj
Best Answer chosen by Ajay Kumar 583
Deepali KulshresthaDeepali Kulshrestha
Hi Ajay,

In General way, you can't do this.
But using the custom field and workflow rule you can do this. 

Create a new Text field on Opportunity called 'Unique Name'
Set the field to Required and Unique 
Use a Workflow Rule to automatically populate this field with the Name of the Opportunity anytime an Opportunity record is created or edited
If the Workflow Rule tries to populate the field with an Opportunity Name that already exists, an error will be thrown. 

I suggest you visit this link, it will help you

https://success.salesforce.com/answers?id=90630000000CwKwAAK

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,

Deepali Kulshrestha.

 

All Answers

Karthikeyan Rajendran 14Karthikeyan Rajendran 14
Hi AjayKumar

      The only way to search the Object for a value (duplicate check) in Validation Rule is VLOOKUP but unfortunately VLOOKUP can only be used with Custom objects. So its not possible to make sure no two Opportunities have same Name via validation rule. You have to go with Trigger to achieve this.

I hope the answer is helpful for you.

Regards
Karthik

 
Deepali KulshresthaDeepali Kulshrestha
Hi Ajay,

In General way, you can't do this.
But using the custom field and workflow rule you can do this. 

Create a new Text field on Opportunity called 'Unique Name'
Set the field to Required and Unique 
Use a Workflow Rule to automatically populate this field with the Name of the Opportunity anytime an Opportunity record is created or edited
If the Workflow Rule tries to populate the field with an Opportunity Name that already exists, an error will be thrown. 

I suggest you visit this link, it will help you

https://success.salesforce.com/answers?id=90630000000CwKwAAK

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,

Deepali Kulshrestha.

 
This was selected as the best answer