Restrict file types on Manufacturer Part

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.  How would I go about that? I realize there is a File Type item type, I just don't know how to use it, or if I need it at all. All inputs appreciated   --Carsten
Parents
  • on the file itemtype, you need to add a server event triggered on the event "onBeforeAdd" the Csharp method will have a context = the AML request to add the file. something like this.getProperty("filename") should give you the filename to check the extension, check on the file Itemtype if there is a more specialized tag something like "extension". If the extension is correct for you return "this" (it passes it to the onAdd action handler inside Aras) if not then return an error (something like return this.getInnovator().newError("invalid filetype")
Reply
  • on the file itemtype, you need to add a server event triggered on the event "onBeforeAdd" the Csharp method will have a context = the AML request to add the file. something like this.getProperty("filename") should give you the filename to check the extension, check on the file Itemtype if there is a more specialized tag something like "extension". If the extension is correct for you return "this" (it passes it to the onAdd action handler inside Aras) if not then return an error (something like return this.getInnovator().newError("invalid filetype")
Children
No Data