Prompt for Add Attachment

I’m looking for a way to launch the Attachment Management prompt you get when adding an attachment (as well as defaulting the Document Type). I would like to achieve this with a custom button click event.

What screen? What context? What have you tried so far?

This would be for a UD Form entry. I have tried calling UD30.GetByID(), UD30.GetNewUD30Attch(), UD30.Update() methods in that sequence and been able to successfully add attachments that way, but I’d like to instead launch the Attachment Management Prompt with the Document Type pre-populated.

	AttachmentHandler.DropNewAttachment(UD30Form,fileName,edv.dataView.Table.Rows[edv.Row]);
//Where edv is the current EpiDataView for UD30 record

This seems to achieve the same result I described above. What I’m looking to do it replicate the Right Click > Add Attachment functionality, so the user will actually see the options to select a File, Document Type, and Title the attachment.