You need to sign in to do that
Don't have an account?
Imtiaz Pasha
Hi Guys , I have 80% coverage but at the deployment one error am getting below are the details .
test class :Milestone1_Project_Trigger_UtilityTest.
Method name :testHandleProjectDeleteTrigger.
this is the error :
System.DmlException: Delete failed. First exception on row 0 with id a062u000001PSZTAA4; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Project Milestone Template records are not allowed to be deleted from the system.: []
Stack Trace: Class.Milestone1_Project_Trigger_Utility.handleProjectDeleteTrigger: line 176, column 1 Class.Milestone1_Project_Trigger_UtilityTest.testHandleProjectDeleteTrigger: line 148, column 1.
Method name :testHandleProjectDeleteTrigger.
this is the error :
System.DmlException: Delete failed. First exception on row 0 with id a062u000001PSZTAA4; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Project Milestone Template records are not allowed to be deleted from the system.: []
Stack Trace: Class.Milestone1_Project_Trigger_Utility.handleProjectDeleteTrigger: line 176, column 1 Class.Milestone1_Project_Trigger_UtilityTest.testHandleProjectDeleteTrigger: line 148, column 1.
Try to check and skip validation rule 'Project Milestone Template records are not allowed to be deleted from the system' in your test class.
Looks like you cannot delete Milestone Records. Review below idea link.
https://trailblazer.salesforce.com/ideaView?id=0873A000000cNwzQAE
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
If you are trying to delete any milestone record in your test class you might get this validation rule.
Use exception to skip validation error in your test class.
Thanks,
Vinay Kumar