Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Error occurs when assignment link is double clicked

SA-6507

Summary



An error occurs when the assignment link is clicked twice.

Error Messages



Unable to open an instance using the given inputs: ASSIGN-WORKBASKET SAMPLE-WORK W-100!MAINFLOW

Steps to Reproduce



1.  Open any case that has assignments.
2.  Double click the assignment link.

Root Cause



The issue occurs when the assignment link is clicked more than once because the application is configured to move the assignment from the workbasket to the user's worklist when the assignment link is clicked. The second click of the assignment link causes the error because the workbasket assignment has already been removed and moved to the user's worklist. 

Resolution



Perform the following local change in the pyAssignmentsLabel Control rule.

The original line of code for the anchor variable in pyAssignmentsLabel is given below:
anchor = "<a target=\"_self\" href=\"" + url + "\">";

To prevent users from double clicking the link, add an onClick function to disable the link after it is clicked once.
 
anchor = "<a target=\"_self\" href=\"" + url + "\" onclick=\"return disableAfterClick()\">";

<script>

  var clickCount = 0;
  function disableAfterClick()
  {                    
     if(clickCount == 0)
     {
        clickCount++;
        return true;
     }
     else
     {
        return false;
     }
  }

</script>

Published May 25, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us