<?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>Restrict file types on Manufacturer Part</title><link>https://www.aras.com/community/f/development/3198/restrict-file-types-on-manufacturer-part</link><description>Hi,

I would like to restrict the file types available to add to a Manufacturer Part to say .pdf and .png . I imagine a kind of filter on the file dialog that pops up when I create a new relationship on an item. &amp;#160;How would I go about that?

I realize</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Restrict file types on Manufacturer Part</title><link>https://www.aras.com/community/thread/253?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 04:34:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:6f472fd7-7ba5-4fb6-a866-71cf62b58e83</guid><dc:creator>Yoann Maingon</dc:creator><description>to specialize the behavior to manufacturer parts, you maybe need to put the method on the relationship, not sure how you called it. I guess something like &amp;quot;Manufacturer Part File&amp;quot;, you look at the itemtype and you add your method on a &amp;quot;onBeforeAdd&amp;quot; event, but in this case the context &amp;quot;this&amp;quot; will be slightly different.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restrict file types on Manufacturer Part</title><link>https://www.aras.com/community/thread/254?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 04:30:43 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a5ed19d0-aea1-49c9-af3d-6c013e31e349</guid><dc:creator>Yoann Maingon</dc:creator><description>on the file itemtype, you need to add a server event triggered on the event &amp;quot;onBeforeAdd&amp;quot;

the Csharp method will have a context = the AML request to add the file.

something like this.getProperty(&amp;quot;filename&amp;quot;) should give you the filename to check the extension, check on the file Itemtype if there is a more specialized tag something like &amp;quot;extension&amp;quot;. If the extension is correct for you return &amp;quot;this&amp;quot; (it passes it to the onAdd action handler inside Aras) if not then return an error (something like return this.getInnovator().newError(&amp;quot;invalid filetype&amp;quot;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restrict file types on Manufacturer Part</title><link>https://www.aras.com/community/thread/243?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 09:15:32 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:1237de14-2174-438d-bcb9-7f6cabbf2132</guid><dc:creator>carstenw</dc:creator><description>Hi Yoann,

thanks for your quick reply! At this moment I think anything will be better than allowing all file types :)

What have you got?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Restrict file types on Manufacturer Part</title><link>https://www.aras.com/community/thread/245?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2017 08:54:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b8fdaea2-2761-41cd-abf0-31be83bb8fe7</guid><dc:creator>Yoann Maingon</dc:creator><description>Not sure we can send parameters to the file search dialog. without changing a core script

Would this be acceptable to check the filetype on the save action?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>