How to execute the trigger without run a cron job?
I put the trigger attached to fire after routing, but no email receive from PM on my Inbox.
then I run cron job, but still no email receive.
$inputDocId = '7416973405d1425b7e84206068536329'; //set to Input Document ID
$caseId = @@APPLICATION;
//find the UID and version for the uploaded Input Document file(s):
$query = "SELECT APP_DOC_UID, DOC_VERSION FROM APP_DOCUMENT
WHERE APP_UID='$caseId' AND DOC_UID='$inputDocId' AND
APP_DOC_STATUS='ACTIVE' ORDER BY APP_DOC_INDEX";
$aFiles = executeQuery($query);
if (is_array($aFiles) and count($aFiles) > 0) {
$aAttached = array();
foreach ($aFiles as $aFile) {
$d = new AppDocument();
$aDoc = $d->Load($aFile['APP_DOC_UID'], $aFile['DOC_VERSION']);
$filename = $aDoc['APP_DOC_FILENAME'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$g = new G();
$filePath = PATH_DOCUMENT . $g->getPathFromUID($caseId) . PATH_SEP .
$aFile['APP_DOC_UID'] .'_'. $aFile['DOC_VERSION'] .'.'. $ext;
$aAttached = PMFAddAttachmentToArray($aAttached, $filename, $filePath);
}
@=files = $aFiles;
@=attachments = $aAttached;
PMFSendMessage($caseId, '
ProcesMakerUAT@abc.com', '
mymail@abc.com', '', '', 'Invoices for case #'.@@APP_NUMBER, 'SendMemo.html', array(), $aAttached);
}
kindly find attached the debug result.
value of file and attachment is null, but I can find the files at server file system