11/26/2024 7:26:01 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Lingering data in controls
Posted: 20 Jul 06 12:01 PM
|
fiogf49gjkf0d
We have a problem with a data entry Form view. Within this form we look a some of the data fields to determine action to take.
All fields on the form are tied to database fields. In theory if the data record does not exist then all fields should be null. This is what happens when the user selects the 'Add' from another form to bring up this data entry form. All fields are null.
The problem occurs when the user is on the form, enters some data and then elects to cancel the form. At this point the form is destroyed and no data is written to the database. This is what we want.
If the user, while still on the same contact, having done nothing else, selects the 'Add' again to bring up the form, the fields appear to still have the previously entered data even though the form was destroyed when the user canceled the previous input. We are doing some field checking to determine actions at start up. Message Boxes show that the data is still present when we do the check. When the field actually renders on the screen it is blank as we expect it to be.
I feel brain dead today. This must be a simple issue. How do we ensure previously entered data is not a factor when opening the form?
|
|
|
|
Re: Lingering data in controls
Posted: 20 Jul 06 1:29 PM
|
fiogf49gjkf0d Forms aren't actually destroyed, or at least evidence appears to suggest they are cached. Any unbound control that is manipulated in one add, closed, then reopened will have the same "data" it had before. The controls are obviously bound correctly if they are rendering as null.
The OnChange event is what synchronizes each control with the bound value in the database so if your check is in the OnOpen event for instance, you will see exactly the behavior you are witnessing. To test the frequency OnOpen is called just throw a MsgBox in there to see how often it fires. |
|
|
|
Re: Lingering data in controls
Posted: 21 Jul 06 1:46 AM
|
fiogf49gjkf0d You could use Application.BasicFunctions.OverlayDefaultsOnNextView - this typically works for unbound views but may help in your scenario also - alternatively on the OnChange of the form just set your objects to null. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|