To send a PDF, first the script uses save as PDF with a variable to control location and name of the PDF file thus created: Found Sets to PDF with unique file names
Then you can specify the same variable as the attachment for your email in the Send Mail script step. Thus, your user can click a button and the script first generates, then emails the PDF.
To "lock" the portal, do you just want to lock this portal on this one layout or do you want to lock portal's records, no matter where they are accessed in your database.
You can use Manage | Security to control access to records on a record by record basis: See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.
You can set script triggers that refuse entry into fields in the portal if the parent record's "lock" field has been set by your email script.
You can also set a validation rule such as:
to reject all additional changes and data entry if Lock is a number field in the parent record that your script sets to 1 in order to lock the record. Please note that sometimes it's best to include all of these "locks" for the same issue.
Basically I the way you are talking about if the parent field is locked the users will not be allowed to enter anything in the portal. Can you please guide me how to create the script on the buttong and what the script will be if
WorkplanID (Parent linked field)
workplanID (child linked field)
Now i want when the button is clicked the parent record WorkplanID is locked and the user can't make any changes to the child records in the portal.
hope fully you have got my point.
The button can perform a single line script:
Set Field [WorkPlan::LockStatus ; True ]
You then create access control expressions in manage security, validation rules and/or scripts that check the value of this one field to control access to the records in both the parent and child table.
We use this method here to prevent employees from accidentally modifying an invoice after it's status changes to "printed".