Innovator inn = this.getInnovator();
// Get the File Type of the file being attached
Item file = this.getRelatedItem();
string filetype = file.getProperty("file_type");
// 7869D76D50ED4BD4985BECB20B1102F7 - Corresponds to the PDF File Type
// 1F6BEC4E228E4FEDA65D1C3647BDA96D - Corresponds to the 3D PDF File Type
if (filetype == "7869D76D50ED4BD4985BECB20B1102F7" || filetype == "1F6BEC4E228E4FEDA65D1C3647BDA96D") {
// Returning an error here will prevent the file from being added
return inn.newError("Cannot upload PDF File");
}
// Returning this will let the Document File be created
return this;
Chris
I tried above code but getting error as Object reference not set to an instance of an object. Guide on this
Hi Ashwini
I checked this method and it works good. Can you try debugging this method ?
Check this post for enabling debugger
https://community.aras.com/b/english/posts/debugging-in-aras-innovator
Thanks
Gopikrishnan R