How to edit a released document via nash?

オフライン

I have got some documents in released state and therefore cant edit them anymore. To not manually revise, update and release 50 documents again, i would like to update / edit a property of them via nash / batch import tool. Logged in as root, still no access is given.

<AML>
<Item type='Document' action='edit' where="[item_number]= 'R940-00002'">
    <rg_type_acronym>CSL</rg_type_acronym>
</Item>
</AML>

===>

-<SOAP-ENV:Envelope>
-<SOAP-ENV:Body>
-<SOAP-ENV:Fault>
  < faultcode > SOAP-ENV:Server.ItemCannotBeLockedException </ faultcode >
  < faultstring > The Document with ID 005B9D7B7F5D4F8FACB70EB97E8D883E you are trying to edit is in a Not Lockable lifecycle state. </ faultstring >
-<detail>
  < af:legacy_detail > The Document with ID 005B9D7B7F5D4F8FACB70EB97E8D883E you are trying to edit is in a Not Lockable lifecycle state. </ af:legacy_detail >
  < af:exception message =" The Document with ID 005B9D7B7F5D4F8FACB70EB97E8D883E you are trying to edit is in a Not Lockable lifecycle state. " type =" Aras.Server.Core.ItemCannotBeLockedException " />
  < af:item type =" Document " id =" 005B9D7B7F5D4F8FACB70EB97E8D883E " />
 </detail>
 </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>
-------- another approach ---------
I successfully tried with some other code to reset lifecycle state from "released" to "in work" state (a corresponding path must be available in the lc map before).
Then i could use another script to update it and use a third script to promote it again. Might most probably work, but I would prefer to have a direct way to do such an update.
Is there any possible way doing this by nash directly on one step most only?
Many thanks
Kind regards
Marcel
  • If you just want to do some temporary clean-up, you can assign an admin identiy to Permission "Relased Documet' and give this Identity the right to update the Item. Than run your NASH query with the corresponding Identity. After finishing your edit, reset the permission again. 

    The 'Super User' identity would be sufficient, cause it normally should be disabled and you just enable it if you really have to do 'Super User' stuff. Alternatively you of course can reset your Permission to the previous settings after your modifications are complete.

  • Hi Marcel

    The issue is because the document item type life cycle is made as NOT LOCKABLE in released state. Ensure that, you have administrator permission and reset the not lockable in document life cycle

    Step 1: Open Document Life Cycle

    Step 2: Click on 'Released' activity

    Step 3: Reset the Not Lockable option

    Step 4: Save unlock the life cycle

    Step 5: Re-login to NASH and edit

    Note: Since version='0' is not used in your AML query, the revision of the document may change and state might change to Preliminary.

    To prevent creating new revision use AML like below

    <AML>
    <Item type='Document' action='edit' where="[item_number]= 'R940-00002'"  version='0'>
    <rg_type_acronym>CSL</rg_type_acronym>
    </Item>
    </AML>

    Up Vote if this solve your question. Slight smile

    Thank You

    GK

  • Hi Marcel,

    I agree with Angela's suggestion of temporarily enabling the Super User Identity since it's the least disruptive option. Once doing that you can login as 'root' through Nash and add the attribute that GK suggested to your AML (version="0"). This attribute will ensure that no versioning logic runs when the documents are edited, so they will remain in the Released state.

    Chris

  • I believe even after giving access to super user, if not lockable option is selected in life cycle then system will not allow user to lock and edit the item. As Chis and Angela suggested, you need to provide permission to Super User for released state, add version="0" and ensure that not lockable is not selected to edit the released document.

    (In this case, I guess Super User already has edit access but the released state is in Not Lockable mode as per the error message else you might get you don't have update permission error.)

    The Document with ID 005B9D7B7F5D4F8FACB70EB97E8D883E you are trying to edit is in a Not Lockable lifecycle state. 

  • 0 オフライン in reply to Gopikrishnan

    works as intended, many thanks, also for the very fast feedback. much appreciated.