I don't quite understand why you first have to get it in PDF. Why not just write a script just find the particular record or records and "send mail"?
can you post the script?
Saving records as PDF should write a file on disk.
Than sending email you should be able to attach this file.
I am a filemaker novice but looking to learn quickly. The script I am using was one I drew from a starter solution to forward payslips to employees. I can make this work if I update the figures in the record each month but keep it as one record. I would like to be in a position to have a record for each month, only updating the appropriate fields and select which record I forward to the employee.
I trust the above makes sense and have set out the scrip I am using below:-
Set Error Capture Freeze Window
Go to Related Record [ From table: "Payslip Information" ; Using layout: "Payslip" (Payslip Information)]
Print Setup [Restore; No dialog
Enter Preview Mode
Adjust Window [Resize to Fit I
Pause/Resume Script [Indefinitely I
If [ Get (LastError) = 0
Set Variable [ $PATH; Value:Get (TemporaryPath) & Payslip ' & Payslip::Payslip ID & ".pdf
Save Records as PDF [ File Name: "$PATH"; Records being browsed]
[Restore; No dialog
Send Mail [ Send via E-mail Client ; To: 'jtlittlefen.net'; Subject: Payslip; Attachment: "$PATH"]
Go to Layout [ "Payslip Information" (Payslip Information)
Thank you for your interest and support
Sounds to me as if your script is not properly isolating the record to use. The best way is probably to capture the recordID as a variable at the start of your script, then use Find Matching Records to isolate just this one record, then send your email.