Refresh Dynaform Grid
Posted: Tue Jan 06, 2015 6:47 am
by tellesmg
Hello!
During a task I changed the grid data, and in some moment I went back to a step with this grid (PMFRedirectToStep() ), but the changes don't appear..
how i do to force the dynaform / grid refresh this data?
Re: Refresh Dynaform Grid
Posted: Sun Jan 17, 2016 11:50 am
by vktRus
2 variants:
1 variant - AJAX.
read data for grid with java-script (AJAX)
http://wiki.processmaker.com/index.php/ ... ing_a_Grid
2 variant - java-script + PHP.
java-script
PHP
delete current case, create new case + send new variables, open new case
Code: Select all $taskId = '754187408569a139dd3b371026265761'; //lookup the starting task's unique ID
$newCaseId = PMFNewCase(@@PROCESS, @@USER_LOGGED, $taskId, array());
//----if a new case was created, change its status in the database
if ($newCaseId) {
// Auto delete current case and go to new case
@@return = PMFDeleteCase(@@APPLICATION);
$dataArray = array ('retMESSAGE' => 'Save', // replace to yours data
'CL_PSEVDONIM' => @@CL_PSEVDONIM,
'CLUID' => @@CLUID,
);
PMFSendVariables($newCaseId, $dataArray);
$phpResultURL = 'cases_Open?APP_UID=' . $newCaseId . '&DEL_INDEX=' . '1';
header('Location: '.$phpResultURL);
die();
}
else {
$msg = "Unable to create new case." . isset(@@__ERROR__) ? @@__ERROR__ : '';
G::SendMessageText($msg, 'ERROR');
}
http://forum.processmaker.com/viewtopic ... tep#p17006