You need to sign in to do that
Don't have an account?

VF_PAGE_MESSAGE|No applicable approval process was found
Hi Guys,
I am having a problem with Auto Approval process when case is created from Customer Community. This process was designed few years ago and working fine until last week. Suddently Auto approval functionality not working.
Below is from debug log
11:06:36.0 (789572586)|WF_RULE_FILTER|[Case : Case Record Type equals Vet Refusal, Complaint] AND ([Case : Case Origin equals Veterinary Portal] OR ([Case : Case Origin equals Web form] AND [Account : Account Record Type equals Veterinarian, Veterinarian School])) 11:06:36.0 (789599544)|WF_RULE_EVAL_VALUE|01250000000Qn2F 11:06:36.0 (790013307)|WF_RULE_EVAL_VALUE|Web form 11:06:36.0 (790025657)|WF_RULE_EVAL_VALUE|Web form 11:06:36.0 (790038537)|WF_RULE_EVAL_VALUE|0121T000000ARoR 11:06:36.0 (790050307)|WF_EVAL_ENTRY_CRITERIA|Palatability Refusals Process|00X50000001a8hG|false 11:06:36.0 (790087611)|WF_PROCESS_FOUND||No applicable approval process was found. 11:06:36.0 (790841041)|CODE_UNIT_FINISHED|Workflow:ApprovalProcessActions 11:06:36.0 (790980116)|DML_END|[251] 11:06:36.0 (791029629)|EXCEPTION_THROWN|[251]|System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: [] 11:06:36.0 (791458699)|HEAP_ALLOCATE|[251]|Bytes:127 11:06:36.0 (791511759)|VARIABLE_SCOPE_BEGIN|[257]|e|System.DmlException|true|false 11:06:36.0 (791603768)|VARIABLE_ASSIGNMENT|[257]|e|"common.apex.runtime.impl.DmlExecutionException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: []"|0x30f3a637 (791710185)|USER_DEBUG|[258]|DEBUG|PalatabilityRefusal_NewCaseController: Exception while submitting for approval: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: []below is from Controller page
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest(); req1.setComments('Auto-Submitted by controller for Approval.'); req1.setObjectId(thisCase.id); System.debug('PalatabilityRefusal_NewCaseController: Process Approval Request: '+ req1); Approval.ProcessResult result; try{ result = Approval.process(req1); if (!result.isSuccess()){ ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.FATAL, 'An Error Occurred when submitting the request. Please contact your administrator.')); return (null); } System.debug('PalatabilityRefusal_NewCaseController: Successfully submitted for approval.'); }catch(System.DMLException e){ System.debug('PalatabilityRefusal_NewCaseController: Exception while submitting for approval: '+e); System.debug('PalatabilityRefusal_NewCaseController: Exception trace: '+e.getStackTraceString()); System.debug('PalatabilityRefusal_NewCaseController: Exception details: '+e.getDMLId(0)); System.debug('PalatabilityRefusal_NewCaseController: Exception details: '+e.getDMLFields(0)); System.debug(thisCase); hasErrors = true; ApexPages.addMessages(e); return (null); }W
We used to receive message in Approval Process Comments that "Auto-Submitted by controller for Approval." but right now we have to manually submit it. It's working fine in manual Approval.
Somehow it stopped working through Controller. Let me know if you need more details to understand it better.
What do you suggest.
Thanks in advance.
All Answers
Thanks again for the quick response as well.