Discussions
Automating Email send
I am creating my first SuiteScript and I want to create a function that checks two different records (one in a customer record and one in a contact record) on submit and verifies that a specific checkbox field in each of those have been checked.
It will also need to validate if two triggered emails have been sent by looking for those custom field check boxes in the customer record.
If both check boxes and both triggered emails have been sent, then the script allows the user to submit their data for that customer without any action.
If both check boxes are filled but neither email has been sent, then on submit, the script sends out the first email to the contact that was assigned the appropriate custom role.