[ax 2012] Copy attachments when sales order gets confirmed?

Hi,

when an order gets confirmed, AX makes a copy of the DocuRef record (RefRecId = SalesLine.RecId)

to attach the same info to the CustConfirmTrans record (RefRecId = CustConfirmTrans.RecId)

I cant find the lines of code where a DocuRef record is created for the CustConfirmTrans record.

I need to send custom informations to CustConfirmTrans record’s attachment.

Can anyone help me?

Thank you in advance.