- Tue Feb 06, 2018 3:53 pm
#813094
Hello,
I created a dynaform that will be accessed via Web Entry. The form contains three different file controls that I would like to send as attachments to the email. Once the form is submitted, two emails will be sent to two different groups.
I added the following trigger (which I plan to add twice based on another post that I saw in the forum). However it is not working.
I added the trigger to be sent Before Routing
I created a dynaform that will be accessed via Web Entry. The form contains three different file controls that I would like to send as attachments to the email. Once the form is submitted, two emails will be sent to two different groups.
I added the following trigger (which I plan to add twice based on another post that I saw in the forum). However it is not working.
I added the trigger to be sent Before Routing
Code: Select all
$aAttachFiles = array();
$caseId = @@APPLICATION;
$inDocUID = '6151910885a258489e120d5090840830'; // Input document UID
$inDocQuery = "SELECT C.CON_VALUE AS FILENAME, AD.DOC_VERSION, AD.APP_DOC_UID, AD.DOC_UID
FROM APP_DOCUMENT AD
JOIN CONTENT C
ON AD.APP_DOC_UID = C.CON_ID
WHERE AD.APP_UID = '".$caseId."' AND C.CON_CATEGORY = 'APP_DOC_FILENAME' AND AD.APP_DOC_TYPE = 'INPUT' AND AD.DOC_UID = '".$inDocUID."'";
$inDoc = executeQuery($inDocQuery);
$g = new G();
if (is_array($inDoc)) {
foreach ($inDoc as $doc) {
$aAttachFiles[$doc['FILENAME']] = PATH_DOCUMENT . $g->getPathFromUID($caseId) . PATH_SEP .
$doc['APP_DOC_UID'] . '_' . $doc['DOC_VERSION'] . '.' . pathinfo($doc['FILENAME'], PATHINFO_EXTENSION);
}
}
PMFSendMessage($caseId, 'xxx@companyname.com', 'lena.thompson@companyname.com', '', '', 'Files', 'customerservice.html', '', $aAttachFiles);