Recall basically represents “Cancelation of an activity on purpose and manually” e.g. if you submitted a leave application for 10 days. And suddenly you realize that you have entered wrong date in your leave application that you just submitted via workflow. Yet, workflow is in-review. So, you have a chance to click Recall. Recall will allow you to edit record once more and you can submit record after modification.
Similarly workflow represent other actions such as Approval, Rejection, and Request Change and so on.
If for any reason you want to disable a specific activity of workflow such as Recall in my example, this can be achieved.
In our given example of recall, my client don’t want to give option of recall to end user, once submitted.
To achieve such a requirement we need to know one basic point i.e. every single action of workflow appears to you via a menu item. E.g. if approver of workflow is able to see Approve button, that is because of a menu item. Similarly Recall comes appears on UI via a menu item, via workflow framework.
Let’s suppose we want to disable Recall for Customer Payment Workflow. So to do that we will keep same theory in mind which we just described above.
Let’s dive into AOT.
First step which you need to do is that, you need to remove Cancel Menu Item for Workflow Type. You need to take workflow type which is for your workflow. For our given example our workflow type is named as CustPaymentTemplate, which is an existing workflow type for customer payment workflow. Have a look at next screenshot and see from where we removed canceled menu item.
Next you need to remove Cancel Event Handler for corresponding workflow Approval. Going back to our example of customer payment workflow, have a look at next screenshot, how we are removing canceled event handler.
That is all, what is needed to remove Recall button from workflow. Doing so will not show Recall button to submitter of workflow, from action strip, from where, he/she has submitted the workflow.
But wait a moment that does not ends the story, yet Submitter of workflow can Recall the workflow from workflow status History screen.
To make sure that submitter has no way to click Recall from anywhere, you need to do change so that workflow submitter cannot do action, from workflow history button. To achieve this, you need to customize underlying class named as WorkflowStatusForm. This class enables and disables the workflow history form controls. So accordingly depending upon what you want to disable you need to further add your custom logic in WorkflowStatusForm(Class)
Do you need Finance? Are you looking for Finance? Are you looking for finance to enlarge your business? We help individuals and companies to obtain finance for business expanding and to setup a new business ranging any amount. Get finance at affordable interest rate of 3%, Do you need this finance for business and to clear your bills? Then send us an email now for more information contact us now via (financialserviceoffer876@gmail.com) whats-App +918929509036 Dr James Eric Finance Pvt Ltd Thanks
ReplyDelete