This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Edit a locked item without creating errors for other users?

BMoberg - Wednesday, July 1, 2015 9:24 AM:

Is there a way to edit an item that is locked by other user, without unlocking the item after update ?
I mean, if I run a method that will edit an item that someone else has locked and currently is working with.
The form still looks like it's locked for the other user, until he tries to save his changes.
Aras will then throw an error about the item already being unlocked.
Then he can't do anything other than just clicking on the "x" and loose his work...

So, is there a way to just update a property (not shown in the form) on an item, that is locked by someone?

Thanks
/Benny



arnaud.chaussard - Thursday, July 2, 2015 5:51 AM:

Hi !

Alter the data in the DB directly...

If your item is not versioned, you can use applySQL (server side only) method with something like :

this.getInnovator().applySQL("UPDATE [MyItemType] set myProperty = 'newValue' where id = '" + this.getID() + "'");

It implies that this is the object you want to edit of course.

It might work for objects with revisions but your object will not get any revision / generation.



BMoberg - Thursday, July 16, 2015 8:19 AM:

Great! Thanks for the response!