Page 1 of 1

AttachmentAdded

Posted: Tue Nov 15, 2022 6:40 pm
by tmeisinger
I added code to step in when an Attachment is Added. Works pretty good. However, we are using the Attachment Naming Utility from SoftPro and my code is firing before the Attachment Naming Utility. I would like to fire my code right after, and interrogate the name the user is selecting from the Utility. Is there a better place than on the IOrder.AttachmentAdded event?

Re: AttachmentAdded

Posted: Fri Nov 18, 2022 3:27 pm
by BobRichards
Each time the user selects a new tab that represents an order, the Attachment Naming Utility will register for the IOrder.AttachmentAdded event. This adds itself to the end of the multicast delegate chain - therefore it will run last. This behavior of multicast delegates is not guaranteed but is typical.

If you do the same technique, there will always be a race condition to see who can be last in the chain. I don't know how to guarantee you are the last to run.