-
I have a legacy Notes application where the Forms have Shared Actions on them, on buttons. The Form also uses global variables to hold objects and data that the Shared Actions employ, like application-wide logging. This was all written years ago under R6.5 and works beautifully there.- In R8.5.1FP3, the “first” Shared Action (that being the one on the Action Button that appears farthest to the left) sees the global objects just fine. The rest of the Shared Actions see not one single global object, so they all fail with “Object Variable Not Set” on the first line, where it’s trying to log Action initiation.
-
This pretty much utterly destroys any utility for Shared Actions in R8.5.1.
-
If BPs could see the SPR database I’d know if this is a known issue, and whether to create a PMR.
-
Thanks for your time…
Subject: You can create a PMR for a known issue…
if it’s causing you trouble, you should do so.
The thing about shared actions that use undefined names is, because the reference can’t be resolved at design time, the code can’t be compiled. So it has to be compiled at runtime. So maybe there’s some difference in the compiling between the versions.
I’d like to suggest you put your shared globals in a script library. If you “use” the library in both the shared action and the form, it’s only loaded once. All the globals are then available in both places. And, the code can be compiled at design time, which is much more efficient and probably less error prone. Any of the shared action code you can put into the script library is also all to the good. In fact, I’m not a big fan of shared actions, and would suggest you just use regular actions that call agents, or that call subroutines in your script library.
Subject: wondering…
it likely would help us to have a pmr, but also in the meantime… If this is happening in 8.5.1, I would like to rule out (or in) the new LS editor. If you turn off the eclipse based LS editor, and then recompile all and/or save the form and the actions again, does the problem remain or resolve?
thanks!