2

Lock Type of an item which is opened, and an item which is edited and saved, are the same. Is there any way to differentiate between these two scenarios?

  • The item which has been opened has the lock type: <tcm:ItemLock Type="1" Title="Check-out">
  • The item which has been opened, edited and saved has also the lock type: <tcm:ItemLock Type="1" Title="Check-out">
1
  • I have a feeling this question is following or somewhat related to your earlier question tridion.stackexchange.com/questions/18190/… Like I commented on one of the answers there, I think you should edit your question and supply some additional information to what you are exactly after so more suitable answers can be given. Dec 14, 2017 at 10:19

3 Answers 3

2

You will need to look at the version of the item. A saved item will produce a minor version. If it's simply checked out it will stay at a major version.

1

The key here is are you opening a Component or a Page in a read-only mode or not. If you are opening it and accepting the prompt that you want to open it in edit mode, the system is rightly locking it. It checks out the Component for the user if they don't choose to open in read-only mode.

The users need to declare intent: by choosing to open it in read-only mode (and then there will be no lock on the item) or open with an intent to edit and system will work as intended and lock the item

0
-1

I believe the LockType in below is simply the CheckOut Type.

<tcm:ItemLock Type="1" Title="Check-out">
<tcm:ItemLock Type="1" Title="Check-out">

Tridion has following LockType:

  • None = 0
  • CheckedOut = 1
  • Permanent = 2
  • NewItem = 4
  • InWorkflow = 8

So now It depends what are you after, If you have opened the item in edited mode the, locktype will be 1 and if it's readonly lockType should be 0 as there are no locks on the Component/Page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.