<?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 let relationship read only in java script ?</title><link>https://www.aras.com/community/f/development/36639/how-to-let-relationship-read-only-in-java-script</link><description>Hi All, 
 
 I need to let relationship read only after I use the java script add the relationship item(code like below).Anyone could give me a hint how to do that? 
 
 //I have a button in parent item&amp;#39;s from to add the data to the relationship 
 tmpItem</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to let relationship read only in java script ?</title><link>https://www.aras.com/community/thread/7068?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 07:30:29 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b8f21770-022f-4bde-b3d4-63eb60e373d5</guid><dc:creator>tenny</dc:creator><description>&lt;p&gt;Thanks it works in Workaround2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to let relationship read only in java script ?</title><link>https://www.aras.com/community/thread/7013?ContentTypeID=1</link><pubDate>Thu, 01 Jul 2021 11:27:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a99f3128-35e5-4dd2-933c-43d9636f77e7</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t find any easier way to achieve this. But you can use below workarounds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workaround 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Create below Javascript method and attached to Relationship Grid Event (On Select Row Event)&lt;/p&gt;
&lt;p&gt;var isItemLocked = aras.isLocked(parent.item);&lt;br /&gt;if(isItemLocked)&lt;br /&gt;{&lt;br /&gt; alert(&amp;quot;Editing is not allowed&amp;quot;);&lt;br /&gt; return false;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workaround 2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Attach the above method to all the visible properties in relationship (On Edit Start Event)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>