When your trying to make any kind of deployment on Production by default all the test classes will be run .To make smother deployment we need to have at least 75% code coverage .Recently when I'm making deployment to production I end up with the below error.
Deployment /Test Class Error:
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ORequestTrigger: execution of AfterInsert caused by: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: [] Trigger.ORequestTrigger: line 81, column 1: []
Reason for the Issue:
If you running any Test class that in turn causes a Main class or Trigger to submit the Test record for an Approval Process (through Apex coding) and If that particular record is failing to meet at least one of the Approval Processes Entry Criteria then it will fail with above error.
Work Around Solution:
Modify the test record data as per the entry criteria of any one of required Approval Process.
Thanks for visiting...Enjoy
Deployment /Test Class Error:
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ORequestTrigger: execution of AfterInsert caused by: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: [] Trigger.ORequestTrigger: line 81, column 1: []
Reason for the Issue:
If you running any Test class that in turn causes a Main class or Trigger to submit the Test record for an Approval Process (through Apex coding) and If that particular record is failing to meet at least one of the Approval Processes Entry Criteria then it will fail with above error.
Work Around Solution:
Modify the test record data as per the entry criteria of any one of required Approval Process.
Thanks for visiting...Enjoy