Selected item not locked

Selected item not locked

Anonymous
Not applicable
1,038 Views
3 Replies
Message 1 of 4

Selected item not locked

Anonymous
Not applicable

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

0 Likes
Accepted solutions (1)
1,039 Views
3 Replies
Replies (3)
Message 2 of 4

Redmond.D
Autodesk
Autodesk

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. 



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes
Message 3 of 4

Anonymous
Not applicable

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?

0 Likes
Message 4 of 4

Redmond.D
Autodesk
Autodesk
Accepted solution

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".



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes