Add attachment single code line - edvCurrAsm in Job entry...ugh?

I’ve been playing around with AttachmentHandler.DropNewAttachment
(Ref: https://www.epiusers.help/t/code-from-meug-presentation-on-5-20-2020-customization-tips-and-tricks/67376 - thanks to Jose)

Seems to work nicely except… I have been stuck trying to attach to assemblies in Job entry. Instead of the edvCurrAsm, my attachments have so far been ending up at the top of the treeview. Wonder if anybody else has been playing with this, might know what I’m missing?

Here is the line I’m using (after I selet an assembly in the treeview & verify the edvCurrAsm):

AttachmentHandler.DropNewAttachment(JobEntryForm,sFileName,edvCurrAsm.dataView.Table.Rows[edvCurrAsm.Row]);

but… here is where the attachment(s) keep landing
image

guessing (hoping) I’m missing something obvious this afternoon.

Can you add that attachment manually in UI at that level?

Yes, but I need to do something custom, was hoping I could use the code in the video Jose posted.

However, now I see this won’t work for JobAsmbl as it defaults to passing JobHead to the RelatedTo in the Xfile. (Just got my wires crossed temporarily, thinking it would magically work out what I was thinking just because I specified edvCurrAsm)

Oh well… I can handle the assembly attachments using multiple lines of code.
and this single line attachment method will still come in handy, now that I see what it can/can’t do.