Service Manager / Service Center Practitioners Forum

can't update action in display option

Go to solution
Super Contributor.

can't update action in display option

I'm using the pre-RAD javascript panel to update the action for the display option.  My simple test is:


system.vars.$L_action="do nothing"


However, the system continues to proceed to the action defined in the displayoption, instead of doing nothing.  I've checked with print statements that this code is executing, and I've also checked that I've updated the variable properly.  I've also tried setting system.vars.$L_ds_action, as well as just vars.$L_action.  No succes.  Am I missing something?


All I really want to do in this javascript section is test for a condition, then stop execution and just return to the ticket if the condition is met.  I thought changing the action was the way to do this, but if there is another way, I'm all ears.  Thanks.

Acclaimed Contributor.

Re: can't update action in display option


The JavaScript to manipulate the $L.ds.action variable needs to be placed in the Post JavaScript tab (or use RAD syntax in the Post Rad Expressions tab).



The display RAD Application is responsible for building many variables (like $L.action and $L.ds.action) and passing some of them to the Document Engine. The $L.ds.action variable is not built until after it executes the RAD Application tab.


RAD: display

Panel: process.option ---> Evaluate Pre Rad Expression and Pre JavsScript tabs

Panel: check.rad ---> Execute the RAD Application (if it is populated)

Panel: get.action ---> $L.ds.action is set to NULL then evaluate Post Rad Expressions and Post Javascript