Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Vysakh
#815939
I am having a trouble when i am creating child jobs, some of the child jobs overlap with the parent jobs.APP_UID for the parent and child jobs are different but they have same APP_NUMBER in APPLICATION table but different APP_NUMBER in APP_DELEGATION. The details of parent job is duplicated in child job.This is the code I used to create child job
Code: Select all
$aData['date_of_job_received'] =@@date_of_job_received;
$aData['ParentJobId'] =@@APPLICATION;
$aData['all_input_received_date'] =@@all_input_received_date;
$aData['due_date'] =@@due_date;

$newCaseId = PMFNewCase(@@PROCESS, @@USER_LOGGED, $taskId, $aData);
	@@cases=@@cases.",".$newCaseId;
	if ($newCaseId) {
   executeQuery("UPDATE APPLICATION SET APP_STATUS='TO_DO' WHERE APP_UID='$newCaseId'");
	PMFDerivateCase($newCaseId, 0);
}
Could you please tell me why this is happening ?
#815945
You're calling PMFDerivateCase() is probably screwing up the new case, because it is using the system variables for the current case. Also the new case should have a delegation index of 1, not 0. If you want the new case to start on the first task, then don't call PMFDerivateCase(). If you want want it to start on the second task, then use this code:
Code: Select all
PMFDerivateCase($newCaseId, 1);
If that doesn't work then try this:
Code: Select all
$g = new G():
$g->sessionVarSave();
$c = new Cases();
$aCase = $c->loadCase($newCaseId);
$_SESSION['APP_NUMBER'] = $aCase['APP_NUMBER'];
PMFDerivateCase($newCaseId, 1);
$g->sessionVarRestore();

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]