Using Vault Pro 2013, I have a command handler that lets the user select multiple items from explorer, then run my function. The function calls "GetItemsByIds" for each selected item, then tests if the item is null or locked. In Vault Explorer, the items have a lock symbol next to them and they are at the "Released" state, but in my function, the test for being locked (selectedItem.Locked) is returning false. How can this be?
Thanks,
Tom
Solved! Go to Solution.
Solved by Redmond.D. Go to Solution.
The API documentation doesn't provide correct information for Item.Locked. I'll log a defect on this.
If you want to see if you can edit an item or not, you will have to explicitly check the item state.
OK, but how do I determine if the state locks the item or not? I can see what lifecycle state the item is in, and I can get the definition for that lifecycle state, but I don't see anywhere that tells me if that state locks the item. Would I have to call "GetStateACLByLifeCycleStateId" and dig down to see if "AllowWrite" is true?
Item lifecycle states are not very configurable. If the state is not work in progress, then the item is locked. So you can just check to see if SysName is equal to "Work in Progress".