Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Lingering data in controls
Jeff L
Posts: 65
 
Lingering data in controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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?
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Lingering data in controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Lingering data in controlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 5:19:25 AM