Automatically Select Approver - Forum - Rollbase - Progress Community

Automatically Select Approver

 Forum

Automatically Select Approver

This question is not answered

Dear All,

I'm using the Rollbase Approval function to approve a record.

What i want to accomplish is making Rollbase automatically select approver, i'm using a 'Risk Manager', defined in another object to Approve or Decline the record.

Is it possible to skip the 'Select Approver' page? 

If so, how?

Kind regards,

Lenn Smink

All Replies
  • Hi Lenn,

    Currently this is not possible to automatically select approver  in Rollbase , can you please log an enhancement under ideas section .

    Thanks,

    Shivali

  • Hi Lenn,

    One way you could do is by creating trigger of type object script and use rbv_api.startApproval API by passing original id of wf action.

    I have created a workflow action of type "Start approval process" by selecting default approver and I've used following code in trigger section of object script trigger.

    rbv_api.startApproval("Project_ll", "{!id}", "ty8fm7dBSsmKxQVhp8aDNg");

    Please let us know if this works for you.

    More information on the above API :

    documentation.progress.com/.../index.html

    Regards,

    Shiva

  • Hi Shiva,

    Thank you for your response, this is working for me!

    But another problem I have is that the button wich is created to run the startApproval API is still clickable after it already started the approval. In this way the approval function can be started multiple times for 1 record, causing the approver to receive tons of emails.

    Is there a way to hide the button after the approval has been started once?

    Kind regards,

    Lenn Smink

  • Hi Lenn,

    Glad it worked for you. You can disable/hide the button in two ways.

    1)In onLoad page event declare a function say(hideButton) and include the following code in script component.

    <script>

    function hideButton(){

    $(".marker-pageToolbar-action .k-button").hide();

    </script>

    }

    2)Or you could edit the  wf action by changing the status  to  "Approval in Progress". Which is I believe is an easy way.

    I prefer option 2 since css class might be changed with release and we need to always keep track of it.

    Regards,

    Shiva

  • Hi Shiva,

    I'm trying the first option but I can't get it working. Somehow the button is not hidden after I declared a function in page properties and added the script to a scriptcomponent.

    The button I'm trying to hide is a button wich is created manually so if the status changes, the button is still visible.

    Kind regards,

    Lenn Smink

  • Hi Lenn,

    Could you please try below code?

    <script>

    rbf_addOnLoadMethod(function() {

    $(".marker-pageToolbar-action.k-button").hide();

    });

     </script>

    Regards,

    Shiva

  • HI Shiva,

    Is there an option to hide the button after it has been clicked?

    I guess I'm doing something wrong with the noLoad functions.

    Kind regards,

    Lenn Smink

  • Hi Lenn,

    Can you please log a support ticket ? So that I can assist you with further steps.

    Regards,

    Shiva