<?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>How to set related item property having datatype as Item?</title><link>https://www.aras.com/community/f/development/5925/how-to-set-related-item-property-having-datatype-as-item</link><description>Hi, 
 I want to set related Item property( owned_by_id ) of Itemtype dynamically on grid &amp;quot;OnIsertRow&amp;quot; event . 
 I tried using following syntax 
 var set_property = setRelatedItemProperty(relationshipID, &amp;quot;owned_by_id&amp;quot;, &amp;quot;48BB4278F78C4D52872036D77EF5812F</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to set related item property having datatype as Item?</title><link>https://www.aras.com/community/thread/2756?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 15:59:25 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0aa3e2ca-22c0-4ca2-8b15-44daa33bd364</guid><dc:creator>Christopher Gillis</dc:creator><description>&lt;p&gt;Hi tushar,&lt;/p&gt;
&lt;p&gt;I tested this code in a local 11.0 SP12 instance, and I can partially confirm this behavior. It seems that the property is set on the item in the dom, so it will be applied when the parent item is saved; however, the grid itself doesn&amp;#39;t seem to be updating to reflect this new value.&lt;/p&gt;
&lt;p&gt;You can try using code similar to that in the gist below which uses the grid object to manually update the value in the corresponding cell.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/cgillis-aras/67e8ab83b07f16729e8e730ebb686866.js"&gt;https://gist.github.com/cgillis-aras/67e8ab83b07f16729e8e730ebb686866.js&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that this code uses a timeout because it seems that the item&amp;#39;s row is not actually rendered to the grid yet when the&amp;nbsp;&lt;strong&gt;OnInsertRow&lt;/strong&gt; event gets run. A relatively small timeout of 50ms worked for my case, but you may need to increase the timeout depending on the performance in your environment.&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;
&lt;p&gt;Christopher Gillis&lt;/p&gt;
&lt;p&gt;Aras Labs Software Engineer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>