- Thu May 18, 2017 6:27 am
#790879
Hello,
I am using processmaker enterprise edition free trial version.
I want to approve/reject case by email. So when user clicked on approve link then it will open new email which contain is shown below:
It is same for rejection and this data will update in database(I mean status, comment and comment's time)
How will I achieve this? Is it possible in community edition 3.1.2 as well?
And In my process, I used multiple uploader in grid. Now I want to attach that uploaded document in email. Uploaded document may be 1 or more than 1. I tried below trigger but didn't work
I am using processmaker enterprise edition free trial version.
I want to approve/reject case by email. So when user clicked on approve link then it will open new email which contain is shown below:
Code: Select all
When user submit this mail it will redirect to next assign user. Status: 'Approved'
Remark:'whatever user typed here'
It is same for rejection and this data will update in database(I mean status, comment and comment's time)
How will I achieve this? Is it possible in community edition 3.1.2 as well?
And In my process, I used multiple uploader in grid. Now I want to attach that uploaded document in email. Uploaded document may be 1 or more than 1. I tried below trigger but didn't work
Code: Select all
Thanks & Regards$caseId = @@APPLICATION;
$gridVar = 'fileuploadgrid';
$fileField = 'multipleFile1';
$subject = @@Title;
//$aFiles = array();
$query = "SELECT C.CON_VALUE AS FILENAME, AD.* FROM CONTENT C, APP_DOCUMENT AD
WHERE AD.APP_UID='$caseId' AND APP_DOC_FIELDNAME LIKE '{$gridVar}_%_{$fileField}' AND
AD.APP_DOC_STATUS = 'ACTIVE' AND AD.APP_DOC_UID = C.CON_ID AND
C.CON_CATEGORY = 'APP_DOC_FILENAME' ORDER BY AD.APP_DOC_FIELDNAME";
$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);
$filePath = PATH_DOCUMENT . G::getPathFromUID($caseId) . PATH_SEP .
$aFile['APP_DOC_UID'] .'_'. $aFile['DOC_VERSION'] .'.'. $ext;
$aAttached = PMFAddAttachmentToArray($aAttached, $filename, $filePath);
}
//get users who have participated in case:
$c = new Cases();
$aUsers = $c->getUsersParticipatedInCase(@@APPLICATION);
$to = '';
foreach ($aUsers['array'] as $userUID => $userInfo) {
$to = (empty($to) ? '' : ', ') . $userInfo['USR_EMAIL'];
}
PMFSendMessage($caseId, 'avi123@gmail.com', $to, '', '',
$subject, 'Notification.html', array(), $aAttached);
}