12-18-2013 11:35 AM
I am calling script.execute from formatctrl ("rootcause")
in the script i am assigning a thread variable to the description with the timestamp and full name of the operator
$deschist=str(tod())+" ("+$lo.ufname+"):";description in $script=insert(denull(description in $script), 1, 1, $description.txt);description in $script=insert(description in $script, 1, 1, $deschist))
the problem here is, when i click add to create a Problem record, i can see the description field having the correct value, but after problem is created if i click Cancel and back out of screen and come back again the description field is empty
I found out that the Problem is actually getting saved before the script is executed from rootcause formatctrl. Is there a way to change the sequence ? Is it how this always works ?
Solved! Go to Solution.
12-18-2013 02:12 PM
In the subroutine line where you call script.execute, make sure the Before property is set to true. (If not true, the subroutine will execute after record save)
12-19-2013 05:54 AM
So what is the difference in making the Save First option as true against the Save action in the State record as against making the before as tru in subroutine ?
12-19-2013 09:41 AM
Yes it worked , when i made the subroutine, Before condition as true
But it also worked when i made the Save First as true, against the action Save in the State record
Just curios to understand what the difference is what the adv/dis adv are
12-20-2013 09:25 AM
Well, format control pre-dates the existence of the document engine (and state level processing), so prior to all modules being migrated to the doc engine (in versions 4, 5, and 5.1) the format control option was primary.
It appears that the document engine state "save first" will perform a similar function, but iI don't really know exactly how the state level "save first" interacts with format control. You'd have to run a RAD trace to get the complete flow or map through the RAD stack to be sure.