Hello All,
I am totally new to workflow, I have created one sample workflow based on workflow document, with Approved, Rejected, Submitted and Draft status. In workflow creation form, i used manual decision as given in the document followed.
Now its working fine for Approve and Cancel but not for Reject. when i reject the workflow, it should go back to Draft status to allow customer to Resubmit. But now when i Reject, its changing the status as Approved. I have manually created Reject method, in event handler class and its not triggered when i check it with debugger.
And i have created only the workflow category and workflow Type not the Approvals(I think it is only causing problem) as the given in the document i followed. Could anyone clarify the workflow steps(especially the Approvals) or any document to achieve what i wanted to create?
*This post is locked for comments
Hi Anand,
Do you find solution for this ? I'm also facing the same problem, during Reject my code to update source table approval status is not working.
PLease help.
Thanks.
Thanks Sohaib, Will try and let you know.
write above shown code in returned method of event handler class and retry after building Incremental CIL.
Hi Sohaib Cheema,
I proceeded as you said, "Return" is the type my Reject outcome.
For your kind information, i didn't created Approvals when is created sample workflow based on the document, Later on only(After all steps) i have created Approvals for the same workflow.
Now my problem is i don't have much idea about Approvals and and how to use it.
kindly proceed to following path
\Workflow\Approvals\..your custom Approval
Expand your custom approval. right click REJECT and click on properties.
Note down Type. what is type for your Reject Outcome?
Thanks for the reply, The below is the code i used for reject, and this method is created manually by me on the event handler class.
public void Rejected(WorkflowEventArgs _workflowEventArgs)
{
MRKPContractRequestPoolTable MRKPContractRequestPoolTable;
select forupdate MRKPContractRequestPoolTable where MRKPContractRequestPoolTable.RecId== _workflowEventArgs.parmWorkflowContext().parmRecId();
if(MRKPContractRequestPoolTable.RecId)
{
MRKPContractRequestPoolTable.ApprovalCRPStatus= ApprovalCRPStatus::Draft;
MRKPContractRequestPoolTable.write();
}
}
what your workflow should do at time of clicking reject can be controlled by code. can you show us code behind Reject Event.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,802 Super User 2024 Season 2
Martin Dráb 229,133 Most Valuable Professional
nmaenpaa 101,154