Posted: 24 Nov 2016 10:38 EST Last activity: 19 Oct 2018 1:51 EDT
How to check if a work item is locked?
Team, I have a requirement where if a user performs a certain action, I need to close(change status to Resolved-Cancelled) for all the child work items(child objects) for that work item and then close the work item itself. The business suggestion is to close all the child work items that can be closed and for the child work items which are locked, need to build a list and show in a grid. I'm thinking to do it by looping through pxCoveredInsKeys list and do Obj-Open-By-Handle for each work item and update status. But my question is how do I check if a work item is already locked before doing Obj-Open-By-Handle, as I need to check this to build a list and skip opening those work items? Please suggest.
Resolution: We used a join with lock table in report definition that we use to retrieve child objects. Using this we were able to get all the locked child objects.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Please refer mentioned activity for more information "pxForceCaseClose" and when child was locked the time we do open by handle we need to handle exception or this is not best practice but use "WorkUnlock" acitivity to unlock the child case.