<?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>Method to Hide/Disable Tab Buttons</title><link>https://www.aras.com/community/f/development/36959/method-to-hide-disable-tab-buttons</link><description>Good day all. Does anyone have a method for hiding/disabling the New Relationship and Delete Relationship buttons based on the state of the item? We have a custom change ItemType, with a Relationship to Files called Redline Files. I would like to be able</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Method to Hide/Disable Tab Buttons</title><link>https://www.aras.com/community/thread/7621?ContentTypeID=1</link><pubDate>Mon, 18 Oct 2021 15:13:04 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b3323b75-2c12-4c4e-a0b0-a0926f30e044</guid><dc:creator>Nathan H.</dc:creator><description>&lt;p&gt;Alaxala,&lt;/p&gt;
&lt;p&gt;Thank you.&amp;nbsp; I will give this a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Method to Hide/Disable Tab Buttons</title><link>https://www.aras.com/community/thread/7620?ContentTypeID=1</link><pubDate>Mon, 18 Oct 2021 07:48:14 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a0c18c33-1575-4abb-b3e3-2e1f9119a3fb</guid><dc:creator>alaxala</dc:creator><description>&lt;p&gt;As I know, the access to these buttons is not supported. I used this code for a similar task, but this is a &amp;quot;dirty hack&amp;quot;, it is not supported and&amp;nbsp;it is not guaranteed that it will work.&lt;/p&gt;
&lt;p&gt;OnSelectRow grid event relationship type:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;var disableBtn = &amp;#39;Your condition. True - disable button, False - enable&amp;#39;
var toolbar = this.document.getElementById(&amp;#39;relationship-toolbars&amp;#39;).children[1];
if (!toolbar) return;
var selBtn = toolbar.datastore.get(&amp;quot;itemview.relationshipscommandbar.default.selectitems&amp;quot;);
if (selBtn) selBtn.disabled = disableBtn;
var crBtn = toolbar.datastore.get(&amp;quot;itemview.relationshipscommandbar.create_item&amp;quot;);
if (crBtn) crBtn.disabled = disableBtn;
var delBtn = toolbar.datastore.get(&amp;quot;itemview.relationshipscommandbar.default.deleterow&amp;quot;);
if (delBtn) delBtn.disabled = disableBtn;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>