Support Article
Error on screen flow after Back/Next button clicked
Summary
A local action has been added inside a button action to display as a modal dialog. Once an item is selected from the tree gird in the modal window, the main screen is refreshed and reflects the selection.
The main screen is incorporated in a screen flow and when the ‘Back’ or ‘Next’ button is clicked the following error is displayed. (Screenshot attached)
PDN article mentions the issue as a Pega UI issue.
https://pdn.pega.com/forums/prpc/user-interface/you-have-lost-the-abilityerror-in-local-action
Error Messages
"You have lost the ability to make this change because a change elsewhere has taken precedence over the change you made here.
Please click on the assignment below to continue."
Steps to Reproduce
1. Create new WO
2. Enter Search criteria
3. Select a Plan
4. Click 'Next'
5. Click 'Next' again
5. Click 'Select' on 3rd screen and a modal window will be displayed
6. Double click on a child item in tree grid
7. Selection will be reflected on the 3rd screen
8. Click 'Back' or 'Next' on screen flow
9. Error is displayed
Root Cause
User is launching a localaction in a modal window on click of an hyperlink in a repeating grid. Now the lock will be lost once the user submits the Local Action or Cancel the Local Aaction. So after this the can't go ahead with the main Flow action because already the lock is lost on that case.
This is because the WorkUnlock will be called from Step36 of SubmitModalFlowAction activity during the submit/cancel of local action.
WorkUnlock is getting called in this case because the Precondition# 2 of Step36 will be true and this causes the WorkUnlock to gets called.
Precondition# 2 of Step36 is "(param.modalSection== "pyGridModalTemplate" || param.modalSection== "pyGridDetails" || param.modalSection== "pyGridRowDetails") &&
(@isAncestorOf(tools, @getClass(param.InterestPage), "Work-") || @isAncestorOf(tools, @getClass(param.InterestPage), "Assign-")) "
In this scenario/issue modalSection will be holding "pyGridModalTemplate" as value . This is because its been launched from Reapeating Grid.
Resolution
Suggested the user to use the Open Local Action option in launching the Modal Window, then the lock is not getting released. Earlier the customer was using the Launch a Local action option in launching the Modal Window.
Published June 12, 2015 - 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.