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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.