/** * * @method * * Add case note. * * @name PMFAddCaseNote * @label PMF Add case note * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddCaseNote.28.29 * * @param string(32) | $caseUid | ID of the case | The unique ID of the case. * @param string(32) | $processUid | ID of the process | The unique ID of the process. * @param string(32) | $taskUid | ID of the task | The unique ID of the task. * @param string(32) | $userUid | ID user | The unique ID of the user who will add note case. * @param string | $note | Note of the case | Note of the case. * @param int | $sendMail = 1 | Send mail | Optional parameter. If set to 1, will send an email to all participants in the case. * @return int | $result | Result of the add case note | Returns 1 if the note has been added to the case.; otherwise, returns 0 if an error occurred. * */ function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1) { G::LoadClass("wsBase"); $ws = new wsBase(); $result = $ws->addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail); if ($result->status_code == 0) { return 1; } else { return 0; } }
function addCaseNote($params) { $result = isValidSession($params->sessionId); if ($result->status_code != 0) { return $result; } if (ifPermission($params->sessionId, "PM_CASES") == 0) { $result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES')); return $result; } $ws = new wsBase(); $result = $ws->addCaseNote($params->caseUid, $params->processUid, $params->taskUid, $params->userUid, $params->note, isset($params->sendMail) ? $params->sendMail : 1); return $result; }
function addCaseNote($params) { $result = isValidSession($params->sessionId); if ($result->status_code != 0) { return $result; } if (ifPermission($params->sessionId, "PM_CASES") == 0) { $result = new wsResponse(2, "You do not have privileges"); return $result; } $ws = new wsBase(); $result = $ws->addCaseNote($params->caseUid, $params->processUid, $params->taskUid, $params->userUid, $params->note, isset($params->sendMail) ? $params->sendMail : 1); return $result; }