<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Unlocking an Item with a Method when locked by a User</title><link>https://www.aras.com/community/f/development/38315/unlocking-an-item-with-a-method-when-locked-by-a-user</link><description>Hello, 
 
 I am attempting to unlock an item when an user has the item locked out for editing and cannot seem to find where to start. 
 I am doing it on the server side with C#. I have tried Item unlockItem(). Also I have tried AML below. 
 string my_aml_unlock</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Unlocking an Item with a Method when locked by a User</title><link>https://www.aras.com/community/thread/10244?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2024 12:59:31 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:55fb9b4a-be82-438e-abeb-a37e38d56b85</guid><dc:creator>conner davis</dc:creator><description>&lt;p&gt;I just tried your second technique there with an existing Item and it appears to have the same behavior as my code.&lt;/p&gt;
&lt;p&gt;What is does is after the method is ran the user can update the item and save it. Once they close the item (with it saved and still locked) it will then unlock to the system.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Basically I am trying to re-create what happens when a user is working on an item, then an admin locks their item (takes it away) then once they try to click, save, discard, etc it puts them into a core lock state. So after the method is run they could not edit it in anyway.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your help, I did not think of doing it that way.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unlocking an Item with a Method when locked by a User</title><link>https://www.aras.com/community/thread/10242?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2024 07:47:29 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:80a1214f-a4f7-42c6-a42c-c1de96fcef44</guid><dc:creator>Slavena Koleva</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Did you try to set the action as &amp;#39;unlock&amp;#39; like in the example below?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;Item myItem = inn.newItem(&amp;quot;MyItemType&amp;quot;, &amp;quot;unlock&amp;quot;);
// or
// myItem.setAction(&amp;quot;unlock&amp;quot;);
myItem.setID(&amp;quot;myId&amp;quot;);
Item unlockedItem = myItem.apply();
if (unlockedItem.isError())
{
    return unlockedItem;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Additionally, you can try something like this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;// Imagine that you already have the item to unlock, i. e. myLockedItem
Item unlockedItem = myLockedItem.apply(&amp;quot;unlock&amp;quot;);
if (unlockedItem.isError())
{
    return unlockedItem;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>