Hey Everyone:
[TL;DR my SanScript code is blanking out the comment ID field (and a couple of other fields) on SOP_Entry. I don't know why.
I've got something going on that I could really use some help with. A customer has requested that I place the SOP UDFs on the main SOP entry screen, read-only is fine. They want them displayed because the users are checking that the integration into SOP (from Web Services) is providing complete information, and currently the users have to - for each invoice - go through the Goto --> User Defined window to ensure that the UDFs are populated. Note: this isn't a discussion about whether or not their process is correct... I've already provided reports and alternate methods of investigation, but this is what they want.
I took the Dynamics.DIC, modified the window to make an alternate window, layer a small amount of code, and found this wild behavior.
This is the screen as it is now, and I've highlighted the fields which get blanked out or have other problems:
When the user goes into the UDF screen and changes anything, these fields get blanked out after running this code:
run script 'SOP Number' of window SOP_Entry of form SOP_Entry;
What I don't understand is why this particular code would / could BLANK fields. (This script is called by a trigger on SetUserDefinedValues of form sopUserDefined, after original.)
I've run a script profiler to see what the heck is happening, but I can't see anything unusual.
Anyone have any thoughts?
Thanks.
-J
PS there are no other customizations on this window.
PPS is this the right script off of which to key to detect and/or cause a window refresh on this window? It seemed like the best candidate.