AttachmentHandler.DropNewAttachment to another Form?

I’m wanting to use the below code to add attachment from MES to JobOper. Is it possible to reference another form/ dataview other than the current Dataview and form or does this only work for the current form and dataview you’re in?

//First parameter : Current Form
//Second Parameter: Filename
//Third: Record To Attach To
//Fourth: Optional Document Type
AttachmentHandler.DropNewAttachment(UD05Form,ofd.FileName,currentEdv.dataView.Table.Rows[currentEdv.Row]);