By Student - Thu Oct 07, 2021 10:51 am
- Thu Oct 07, 2021 10:51 am
#829557
Hello,
I am currently having trouble displaying the title of the project on the output document when receiving it as a pdf. The data also does not appear inside the pdf. I am uncertain if it's an issue with the database or if the trigger is wrong. Has anyone encountered this issue?
The trigger for sending an email with the output document
$docId = '315355263615cb11e95f7e9005773565'; //set to the Output Document's unique ID
$caseId = @@APPLICATION;
PMFGenerateOutputDocument($docId);
$sql = "SELECT DISTINCT APP_DOC_UID FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND DOC_UID='$docId'";
$aNewDoc = executeQuery($sql);
if (empty($aNewDoc)) {
throw new Exception("Error: Unable to generate Output Document with ID '$docId'.");
}
else {
$fileId = $aNewDoc[1]['APP_DOC_UID'];
$oDoc = new AppDocument();
$aDocInfo = $oDoc->load($fileId);
$ext = '.pdf'; //set to '.doc' if sending a DOC file
$g = new G();
$pathToFile = PATH_DOCUMENT . $g->getPathFromUID(@@APPLICATION) . PATH_SEP . 'outdocs' .
PATH_SEP . @@Placa .
PATH_SEP . $fileId . '_' . $aDocInfo['DOC_VERSION'] . $ext;
$filename = $aDocInfo['APP_DOC_FILENAME'] . $ext;
$aAttachments = array(
$filename => $pathToFile
);
$to = ' admin@processmaker.com'
@@msg = PMFSendMessage(@@APPLICATION, ' student@gmail.com', $to, '', '',
'Testing Subject', 'email_Info.html', array(), $aAttachments);
}
Thank you
I am currently having trouble displaying the title of the project on the output document when receiving it as a pdf. The data also does not appear inside the pdf. I am uncertain if it's an issue with the database or if the trigger is wrong. Has anyone encountered this issue?
The trigger for sending an email with the output document
$docId = '315355263615cb11e95f7e9005773565'; //set to the Output Document's unique ID
$caseId = @@APPLICATION;
PMFGenerateOutputDocument($docId);
$sql = "SELECT DISTINCT APP_DOC_UID FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND DOC_UID='$docId'";
$aNewDoc = executeQuery($sql);
if (empty($aNewDoc)) {
throw new Exception("Error: Unable to generate Output Document with ID '$docId'.");
}
else {
$fileId = $aNewDoc[1]['APP_DOC_UID'];
$oDoc = new AppDocument();
$aDocInfo = $oDoc->load($fileId);
$ext = '.pdf'; //set to '.doc' if sending a DOC file
$g = new G();
$pathToFile = PATH_DOCUMENT . $g->getPathFromUID(@@APPLICATION) . PATH_SEP . 'outdocs' .
PATH_SEP . @@Placa .
PATH_SEP . $fileId . '_' . $aDocInfo['DOC_VERSION'] . $ext;
$filename = $aDocInfo['APP_DOC_FILENAME'] . $ext;
$aAttachments = array(
$filename => $pathToFile
);
$to = ' admin@processmaker.com'
@@msg = PMFSendMessage(@@APPLICATION, ' student@gmail.com', $to, '', '',
'Testing Subject', 'email_Info.html', array(), $aAttachments);
}
Thank you
Attachments
Title does not appear.PNG (4.14 KiB) Viewed 5416 times
phpMyAdmin not displaying the output document title.PNG (26.02 KiB) Viewed 5416 times
Output Document Title.PNG (26.03 KiB) Viewed 5416 times