<?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>save , unlock and close</title><link>https://www.aras.com/community/f/development/3835/save-unlock-and-close</link><description>Hi

how can i save changes by save , unlock and close button ?

regards .</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1842?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 08:29:43 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:f2c226cd-ae95-477d-825b-7344fd7fd45b</guid><dc:creator>Former Member</dc:creator><description>Hi

it was false , i want to save the new value with save and unlock and exit button .

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1841?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 07:18:33 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3edabfb5-bf5e-43f7-b592-b03a50ed1e9a</guid><dc:creator>AngelaIp</dc:creator><description>How many ItemTypes are involved in this usecase? 
parent.onSaveUnlockAndExitCommand() will only save your current context Item, not your Result4 Item. 
As far as I understand your code you want to change a &amp;quot;Result4&amp;quot; Item from in the Form of another ItemType. Is this correct?

Why do you want to lock and unlock your Item after partItem.apply()?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1840?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 06:23:15 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:ce70612a-f4b0-46e5-a9ac-aba7dff7bf8d</guid><dc:creator>Former Member</dc:creator><description>Hi thank you for your answer .

I added this command , but the changes not saved , the code is :

var inn = aras.IomInnovator;
var t5id = getFieldByName(&amp;quot;text0&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value;
var t5date = getFieldByName(&amp;quot;text1&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value;
var t5name = getFieldByName(&amp;quot;text2&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value;
var t5comment = getFieldByName(&amp;quot;text3&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value;
var t5button = getFieldByName(&amp;quot;Update&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value;

var innovator = new Innovator();
var partItem = innovator.newItem(&amp;quot;result4&amp;quot;,&amp;quot;edit&amp;quot;);
var id = document.thisItem.getProperty(&amp;quot;id&amp;quot;);
partItem.setID(id);
partItem.setProperty(&amp;quot;t4id&amp;quot;, t5id);
partItem.setProperty(&amp;quot;t4date&amp;quot;, t5date);
partItem.setProperty(&amp;quot;t4name&amp;quot;, t5name);
partItem.setProperty(&amp;quot;t4comment&amp;quot;, t5comment);
partItem.apply();
partItem.lockItem();
console.log(id);
parent.onSaveUnlockAndExitCommand();&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1839?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 05:28:36 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:145da882-9d8f-435b-8453-8d6ddff86a66</guid><dc:creator>AngelaIp</dc:creator><description>It depends on your usecase. E.g. you have some &amp;quot;Do something&amp;quot; button in your Item-Form that triggers an &amp;quot;onClick&amp;quot; Javascript Method. Than you can add this code at the end of the Method.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1838?ContentTypeID=1</link><pubDate>Fri, 20 Jul 2018 02:56:32 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:99179c3a-b81f-46d5-8c6c-5632528a0da6</guid><dc:creator>Former Member</dc:creator><description>Thank you for your answer .

where should I write this command?

i mean which event ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1837?ContentTypeID=1</link><pubDate>Fri, 20 Jul 2018 02:04:58 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:1660e3c8-e120-426f-8da9-07d226248f32</guid><dc:creator>AngelaIp</dc:creator><description>Maybe this one works:
&lt;code&gt;parent.onSaveUnlockAndExitCommand();&lt;/code&gt; or&lt;code&gt;onSaveUnlockAndExitCommand();&lt;/code&gt;

The File &lt;code&gt;formtool_window.js&lt;/code&gt; in the codetree gives a good overview of these Form functions.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save , unlock and close</title><link>https://www.aras.com/community/thread/1836?ContentTypeID=1</link><pubDate>Thu, 19 Jul 2018 10:02:38 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3f46ab09-3ae4-41a7-bf2f-658d40d1ce23</guid><dc:creator>Former Member</dc:creator><description>Hi

I make it but with button with event on click with this code :

var innovator = new Innovator();

var partItem = innovator.newItem(&amp;quot;result4&amp;quot;,&amp;quot;get&amp;quot;);
var t4id = document.thisItem.getProperty(&amp;quot;t4id&amp;quot;);
var t4date = document.thisItem.getProperty(&amp;quot;t4date&amp;quot;);
var t4name = document.thisItem.getProperty(&amp;quot;t4name&amp;quot;);
var t4comment = document.thisItem.getProperty(&amp;quot;t4comment&amp;quot;);
console.log(t4id);
console.log(t4date);
console.log(t4name);
console.log(t4comment);

getFieldByName(&amp;quot;text0&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value=t4id;

getFieldByName(&amp;quot;text1&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value=t4date;

getFieldByName(&amp;quot;text2&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value=t4name;

getFieldByName(&amp;quot;text3&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0].value=t4comment;

var t5button = getFieldByName(&amp;quot;Update&amp;quot;);
var lockstatus=document.thisItem.fetchLockStatus();
if (lockstatus===0) {
console.log(&amp;quot;the item is locked&amp;quot;);
t5button.getElementsByTagName(&amp;quot;input&amp;quot;)[0].disabled = true;

}
else
t5button.getElementsByTagName(&amp;quot;input&amp;quot;)[0].disabled = false;

but i want make the changes with out button , i want with save , unlock and close button ?

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>