+ Start a Discussion
Abhishek Kumar 149Abhishek Kumar 149 

How to restrict one one opportunity on particular account.

Abhishek Kumar 149Abhishek Kumar 149
How to restrict one opportunity on particular account
Karan Shekhar KaulKaran Shekhar Kaul

Hi Abhishek,

What is the use case scenario? Can you explain a bit?

Regards,

Karan

Deepak Maheshwari 7Deepak Maheshwari 7

Hi Abhishek,

 

Please create a rollup summary field on Account which counts the Opportunity records.

 

Then create a validation rule on Opportunity with below condition:

Please replace Opp_Count__c by your API name of rollup summary field.

ISNEW() && Account.Opp_Count__c >= 1

 

Thanks

Abhishek Kumar 149Abhishek Kumar 149
What is use of ISNEW()?
 
Deepak Maheshwari 7Deepak Maheshwari 7

This ISNEW() function works only when the record is created. It will not work when you edit and save the record.

 

Hope the above solution works for you!

 

Thanks

Deepak

Deepak Maheshwari 7Deepak Maheshwari 7

Hi,

 

If the above solution works for you.

Please mark it as the best answer.