I was working with a wentity object (a custom data object). I bound it to some controls on my form.
Later, when coding the logic to open the form, I passed in values that were set on some of these fields to pull up an initial record. When testing, however, I found that when I entered and then left one of these fields, the values in the other 2 were cleared. I could not find any of my code that was the culprit. Then I began wondering if the wentity object was the culprit.
In deed it was. Each time I refreshed the window, I newed up the wentity object. This cleared the fields in the object, but not on the window. However, whenever I did anything that called validation logic from the wentity object, the values were refreshed (and cleared)!
The fix was to manually set the values for these three variables in the wentity object each time I newed it.
Did this help you? If so, please leave a comment!
David Jedziniak maintains this blog and posts helpful tips and tricks on SQL Server and Dynamics GP development. The opinions expressed here are those of the author and do not represent the views, express or implied, of any past or present employer. The information here is provided without warranty of fitness for any particular purpose.
Thursday, November 18, 2010
Subscribe to:
Posts (Atom)
SQL 2022 TSQL snapshot backups!
SQL 2022 now actually supports snapshot backups! More specifically, T-SQL snapshot backups. Of course this is hardware-dependent. Here ...
-
If you are reading this, you are probably aware of the fact that you cannot deploy SSRS 2008 reports on an SSRS2005 server. SSRS reports ar...
-
SQL Job to refresh TEST from PRODUCTION Last Updated: 2018.11.12 I like to include each of these steps as a separate job step. If you ...
-
I ran into an issue today where I had a report parameter default that I couldn't seem to get rid of. In BIDS, I deleted the defaults f...