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.
#825801
Hi guys
The triggers that i made to run After Dynaform wont be run when i redirect to the end of step using this line in the java script of Dynaform
Code: Select all
location="../cases/cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN";
The triggers will run if i made them to run before or after routing but not after Dynaform .
why ?
#825812
You are skipping the submitting of the Dynaform by using that code. If the Dynaform isn't submitted, then the trigger(s) which are set to fire after the Dynaform also won't fire. In contrast, the before assignment and before and after routing triggers are fired by the PHP code which is executed by the URL ../cases/cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN.

If you want redirect to the end of a task, then you should set a hidden field in your Dynaform with JavaScript and then use a trigger to redirect to the end.
For example, create a hidden field in your Dyanform with the ID and variable "action". Then, add a Submit button to your Dynaform with the ID "skipToEndButton". Then add the following JavaScript:
Code: Select all
$("#skipToEndButton").click( function() {
    $("#action").setValue("SKIP_TO_END");
});
Then, create a trigger like this:
Code: Select all
if (@@action == 'SKIP_TO_END') {
    header("location: ../cases/cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN");
}
Set this trigger to fire before the next step (which follows the Dynaform). Do NOT set it to fire immediately after the Dynaform, because at that point, the variables from the Dynaform haven't yet been saved to the database.
(Note: If you want to fire immediately after the Dynaform, then you need to use PMFSendVariables to save the Dynaform's variables to the case before redirect the web browser.)

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[…]