Vault Customization

Reply
Distinguished Contributor
tommam
Posts: 139
Registered: ‎05-07-2008
Message 1 of 4 (162 Views)
Accepted Solution

Selected item not locked

162 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

Employee
Redmond.D
Posts: 795
Registered: ‎12-12-2006
Message 2 of 4 (140 Views)

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
tommam
Posts: 139
Registered: ‎05-07-2008
Message 3 of 4 (133 Views)

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
Redmond.D
Posts: 795
Registered: ‎12-12-2006
Message 4 of 4 (129 Views)

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/

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community