Heya
We currently have a custom module (package) and we've setup a workflow to send an SMS to the user when a specific drop down changes.
We're wanting to use a manual button at the top to send an email to the contact with a specific field from the custom module record, but it keeps either getting stuck in 'sending' with a value of 0, or is not sending at all.
Below is what we're working with, any suggestions would be great!
Thanks
Matt
(We've changed email address here from our actual one)
We currently have a custom module (package) and we've setup a workflow to send an SMS to the user when a specific drop down changes.
We're wanting to use a manual button at the top to send an email to the contact with a specific field from the custom module record, but it keeps either getting stuck in 'sending' with a value of 0, or is not sending at all.
Below is what we're working with, any suggestions would be great!
Thanks
Matt
(We've changed email address here from our actual one)
Code:
$refPackage = string(refpack); // force to string $contactEmail = contact.emailAddress; $fromEmail = 'accounts@yourdomain.com'; $subject = 'Your Reference'; $body = 'Heya - your reference number is: ' + $refPackage + '. Please check your documents for confirmation.'; $emailId = record\create( 'Email', 'to', $contactEmail, 'from', $fromEmail, 'subject', $subject, 'body', $body, 'isHtml', false, 'direction', 'outbound', 'status', 'Sending', 'type', 'Outbound', 'assignedUserId', createdById, 'parentType', 'Contact', 'parentId', contact.id );
Comment