AnsweredAssumed Answered

Approve / Reject button on approval workflow task

Question asked by vrangaswamy on Jun 6, 2018
Latest reply on Jun 9, 2018 by banin02

I am trying to add a Approve and reject task button on the approval tasks. 

I can set the status value to the status attribute but I could not submit the form with the value so that it can persist in DB.

I tried the detailSave_cb() which can be used to save the information. But this opens up the edit mode window.


function approve_reject(status_str) {
   if("$args.status.sym" == "Pending") {
      if(status_str !='' && status_str !=undefined){
         document.getElementsByName("SET.status").value = status_str;
      showAlertMsg("This $args.task.sym is already $args.status.sym ");
<PDM_IF "$args.task.sym" == "Approval Task">
<PDM_MACRO name=button Caption="Approve[a]" Func="approve_reject('Approved')" hotkey_name="Approve[a]" ID=btn002 Width=120>
<PDM_MACRO name=button Caption="Reject[j]" Func="approve_reject('Reject')" hotkey_name="Reject[j]" ID=btn002 Width=120>


I want to update the status by clicking on the approve or reject button, then submit the form and close it.


Also this workflow task approval should reflect on the change order status as "Approved".