How does $L.action get assigned a value
When you click the button "Reopen" on an incident record, it executes the Process im.reopen.
Inside the process im.reopen, there's the following code:
if ($L.action="reopensave") then ($L.do.reopen.save=true)
How did the $L.action gets its value?
I was trying to call the im.reopen via script but it does not execute because the value of $L.action is "reopen" only. It doesn't recognize it if I set the value in the script by using the code system.vars.$L_action = "reopensave"
Re: How does $L.action get assigned a value
In External Access Definition is a service name "MobilityIncident1" that triggers "reopensave" action. So it's called via web services.
If you look the state definition "im.view" (which bundles together display actions, display screens, forms..), there are two actions calling "im.reopen".
Condition of action "reopen" is true, but "reopensave" is $G.bg. Latter means it can be run. if it has been called "from the background". So IMO, you can't call that action without running the calling code in a background.
It might be easier to modify the process "im.reopen" and set for example
if ($L.action="reopensave" or $yourVariable=true) then ($L.do.reopen.save=true)
Now you can call a "standard" reopen and trigger reopen+save functionality by setting the variable true/false in your code.
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish