Clarity Service Management

Expand all | Collapse all

Approve / Reject button on approval workflow task

  • 1.  Approve / Reject button on approval workflow task

    Posted 06-06-2018 04:25 PM

    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(document.getElementsByName("SET.status").value);
             detailSave_cb();
          }
       }
       else
       {
          showAlertMsg("This $args.task.sym is already $args.status.sym ");
          return;
       }
    }
    <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". 



  • 2.  Re: Approve / Reject button on approval workflow task

    Posted 06-09-2018 12:23 PM

    Just a thought. Did you try using the "CAB Console"? This gives you a similar function to what you are looking for.