function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
krios demokrios demo 

Restrict user for creating Opportunity on Month End when the current user had pending opportunities using a validation rule

When current user have 10 opportunities, 4 are pending and remaining are closed won or closed lost and
When user (Sales Executive Profiles user) login to salsforce on month end (30th, 31th) including leap year (28th, 29th) then he/she will not able to create the new opportunities until he/she not completed the opportunities i.e. stage = Closed Won/Closed Lost.

Inshort: When opportunities are pending Current user (Sales Executive Profiles User)not able to create the new opportunities on month end. (Using Validation Rule)

I have to create the validation rule for this. I need Help.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Krios,

We may not be able to do this with validation rule because we need all the opportunites created by him and check the stage.

We may have to use trigger here.

Thanks,