October 16, 2017, 8:06pm
I am trying to create a BPM on attachments. I have created a Pre-Processing record on XFileRef.Update. I want to prevent users from adding shortcuts as attachments. I cannot seem to get the BPM to work with any type of conditional I use.
Has anyone been able to do something like this?
(Jose C Gomez)
October 16, 2017, 9:02pm
Try a data directive the attachments stuff is tricky and I don’t think it uses the same BO for everything. Try a DD in XFileAttach or XFileRef
October 16, 2017, 9:11pm
I have a BPM that checks to see if it’s a local drive or a mapped drive, it’s an In-Transaction Data Directive on XFileRef, seems to work for us. Here’s a screenshot of the setup, maybe you can tweak it to check for shortcuts files.
October 16, 2017, 10:06pm
You should check for the file extension. Windows 7 shortcut files have the .lnk extension.
October 17, 2017, 4:22pm
I got it to show a message. I used an In-transition data directive. But it still allows the user to attach the file, after clicking OK. How do i stop the attachment?
October 17, 2017, 4:40pm
I needed “Show Message” to be “Raise Exception”
October 17, 2017, 4:43pm
You need use the Raise an Exception to flow control to abort the current code block and exit from the BPM.
This is a code controlled example:
if(lastUnderScore + 1 == PartNum.Length)
throw new Ice.BLException(“Add manufacturer to end of part number”);
October 17, 2017, 5:06pm
The show message flow does not provide you with control. Use the Rise Exception to Display a message and abort the flow.
October 17, 2017, 5:12pm