You need to sign in to do that
Don't have an account?
Ajay Kumar 583
Please help how to achieve this?
Hi,
I dont want to allow any change in Opportunity where the Stage = “Closed Won” or “Closed Lost”.
Show an error message on the “Opportunity Stage” field of standard page “Since the Opportunity has been Closed, no change is allowed on record”.
Thanks,
Aj
I dont want to allow any change in Opportunity where the Stage = “Closed Won” or “Closed Lost”.
Show an error message on the “Opportunity Stage” field of standard page “Since the Opportunity has been Closed, no change is allowed on record”.
Thanks,
Aj
Use bellow code for showing error when stage name is closed won or closed lost
Trigger :
Apex Controller
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
There is an error in the code where oppList it is => if(ollList.size()<=0)
Even i clear this the trigger is not working as per the logic
Error Throws as Below :
TriggerOnOportunity4: execution of BeforeUpdate caused by: System.FinalException: SObject row does not allow errors Class.TriggerController4.updateOppMethod: line 13, column 1 Trigger.TriggerOnOportunity4: line 4, column 1
You can try below code, it is working according to your requirement.
Trigger:-
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 one is different query which is achieved through Validation Rule. Please go through the query once.
Thanks,