Vault Customization

Vault Customization

Reply
Distinguished Contributor
139 Posts
0 Kudos
Registered: ‎05-07-2008
Post 1 of 4
Accepted Solution

Selected item not locked

177 Views, 3 Replies
01-14-2013 02:54 PM

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

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

Employee
814 Posts
272 Kudos
Registered: ‎12-12-2006
Post 2 of 4

Re: Selected item not locked

01-17-2013 05:45 AM in reply to: tommam

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.
http://justonesandzeros.typepad.com/

Distinguished Contributor
139 Posts
0 Kudos
Registered: ‎05-07-2008
Post 3 of 4

Re: Selected item not locked

01-17-2013 08:19 AM in reply to: Redmond.D

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?

Employee
814 Posts
272 Kudos
Registered: ‎12-12-2006
Post 4 of 4

Re: Selected item not locked

01-17-2013 09:01 AM in reply to: tommam

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.
http://justonesandzeros.typepad.com/

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!