Function

Function

Hello,

In a form I can generate a purchase order. I've made a custom template which looks like a purchase order. When I submit the form there will be sent an e-mail with the template as an attachment in PDF.

I also generated a report which shows all the records of the made purchase orders.
Now I'm trying to make make a custom function.This function will be a button in each record in the report. When you press the button it will send the e-mail again with the purchase order template in PDF as an attachment.

I've made a custom function with the function "Sendmail". In the scriptbuilder I can't add a record summary. 
How can I do this? Or isn't this possible?

Greatings,

Erwin