I have a client with an old old old UA (4.0.2 Rev E) they won't pay to update. A problem has appeared and if I describe it, perhaps it will fire someone's long dormant neurons...
I did not write this PRD but have now put in 5 hours adding debug code and experimenting with it to try and get it to behave. This is far from my first PRD, I've done stuff like this hundreds of times, so the behavior is inexplicable and clearly a bug, I just am hoping someone remembers a workaround.
To summarize, the PRD looks up a user, starts filling in some fields, all is joyful. They then fire a custom event and in the event handler read an attribute (L) and semantically build the DN of an object (meaning it assembles it from the value using string concatenation) which is used in a form.select() to select a picklist item.
This is where things get wonky. I get everyone's favorite red error in the form referencing IDVault.get() getting the string "undefined" back as the value of the object returned from the DN. Ok, so I figure the DN is coming back wrong, but it was used correctly in a whole bunch of IDVault.get()'s back when things were happy happy joy joy (a few precious miliseconds earlier).
Now we enter the twilight zone, if I display the DN with a form.alert() right before the IDVault.get(), it all works. Actually there is another detail, we realized that it turns out if you are really quick on the draw of clicking OK you can still experience the failure. But if you wait a second or so it works.
I guess my question here is if anyone knows a way to tell the browser to keep processing background threads like it does while it's waiting for you to dismiss the alert dialog while holding in a loop so that we can workaround this timing issue. I almost want to just pop up an animated hour glass for couple of seconds...
Just trying to find a way to resolve this without resorting to rocket surgery...