<?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>Buton code</title><link>https://www.aras.com/community/f/development/36476/buton-code</link><description>Hello, 
 I wrote this very simple code in a javascript client side method : 
 var inn = aras.IomInnovator; alert(this.getProperty(&amp;quot;name&amp;quot;)); alert(this.getId()); alert(&amp;quot;eee&amp;quot;); 
 When i run this method by a action in Server Event (in item Type Part for</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Buton code</title><link>https://www.aras.com/community/thread/6680?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 15:21:28 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0fad9049-f8d8-4554-859e-464c835625cd</guid><dc:creator>Skyler Crossman</dc:creator><description>&lt;p&gt;Jeromecha,&lt;/p&gt;
&lt;p&gt;The issue is this. The &amp;quot;this&amp;quot;&amp;nbsp;keyword changes meanings in different contexts, and&amp;nbsp;in the context of an onClick event it doesn&amp;#39;t refer to the item. Use document.thisItem instead to point at the thing the item whose form you&amp;#39;re on, making your code look like the following:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;var inn = aras.IomInnovator;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;alert(document.thisItem.getProperty(&amp;quot;name&amp;quot;));&lt;/em&gt;&lt;br /&gt;&lt;em&gt;alert(document.thisItem.getId());&lt;/em&gt;&lt;br /&gt;&lt;em&gt;alert(&amp;quot;eee&amp;quot;);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In general, I don&amp;#39;t trust code using the &amp;quot;this&amp;quot; keyword in different situations as it is very prone to meaning something other than what&amp;#39;s expected. It&amp;#39;s good to check what exactly &amp;quot;this&amp;quot; is at the time you&amp;#39;re using it. (Also this is hard to write about without reenacting Abbot and Costello&amp;#39;s Who&amp;#39;s On First!) Hope that helps!&lt;/p&gt;
&lt;p&gt;-Skyler C&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>