Community
Showing results for 
Search instead for 
Do you mean 
Reply

Data update carryover into next record

Copper Contributor
Posts: 87
Country: USA

Data update carryover into next record

I am struggling with a “feature” of ACT! by Sage that seems to apply to Av7 thru 10.0.3, at least.  When I make an update to a field, then use the toolbar arrows to move the next or prior record BEFORE IT LEAVE THE FIELD THAT I UPDATED, that same field gets updated in the record that I moved to, with the same new value that updated the record that I left.

 

I have tried everything that I can think of, including using SendKeys.Send(“{TAB}”), to no avail.   

 

If I tab out of the field, or switch to the Contact List, or do a lookup, or basically anything except move directly to the next or prior record, it doesn’t happen.  But if I move to another record without leaving the updated field, that update gets applied to the next record as well. 

 

Does anyone have any idea how to avoid this behavior?

 

TIA,

Geoff  
Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994
Employee
Posts: 236
Country: USA

Re: Data update carryover into next record

Geoff, can you elaborate on what you mean by you make an update to a field?  Are you updating a field descriptor programatically; and if so, what event (call stack) is causing the update to the field?

 

I've seen this before in a plugin that is trying to update a field from a non UI/main thread (which can cause all sorts of issues).

 

Copper Contributor
Posts: 87
Country: USA

Re: Data update carryover into next record

When the user changes to a different contact, the plugin (may or may not) changes to a different layout.  The plugin does not programmtically change any field - there is no SetValue anywhere in the program.  There is a Save in the ContactChanging event handler, but no program statements that perform any updates in the ContactChanged event handler - just the layout change (under certain conditions).  But regardless of whether or not the layout is changed, the updated field value carries over to the "new" record.

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994
Employee
Posts: 236
Country: USA

Re: Data update carryover into next record

Thanks Geoff, that helps.  It may be your Save call whe the ContactChanging event fires is the issue.  I'm not sure you need that, saving should occur implicitly (the view already forces all controls to save if dirty).  Can you remove that and see if the issue goes away?

 

Another issue that I've seen, which could be related here, is that it is important to detach from any Changing and Changed events in the CurrentContactListChanging event, if you are attached to the CurrentContactList (and re-attach to the new one in CurrentContactListChanged). Otherwise, you may not be using the list you think you are.

 

HTH

Copper Contributor
Posts: 87
Country: USA

Re: Data update carryover into next record

Thanks for the tip.  So, I tried that - I removed the Act.UI.IContactDetailView Save routine - still no joy.  Same results.

 

The only way to avoid the updated value carrying over into the switched-to record is to tab out of the updated field before switching records.

 

At this point,there are NO statements anywhere in the program that perform any data updates of any kind, yet the field on the switched-to record show the value in the updated field in the switched-from record when the cursor has not left the updted field on the switched-from record and the record switching is a result of clicking on the toolbar next-record/prior-record icon.

 

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994
Employee
Posts: 236
Country: USA

Re: Data update carryover into next record

Thanks Geoff.  I think the next step would be to look at what the plugin code is doing and how it is interacting with ACT!.  I'm assuming this isn't a product defect (though could be an SDK issue) - in other words, if the plugin isn't there, the problem doesn't occur?  Seems there could be some interaction of events, etc.. that we could be overlooking here.   

 

If you can isolate and repro the issue in a sample plugin (again, I'm assuming a plugin is needed to cause the behavior), I'd be happy to look at it offline.

Copper Contributor
Posts: 87
Country: USA

Re: Data update carryover into next record

Ok, I've got the simplified plugin ready for you.  How do I send it to you?

Geoff

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994
Employee
Posts: 236
Country: USA

Re: Data update carryover into next record

I'll contact you offline, thanks Geoff.

Copper Contributor
Posts: 87
Country: USA

Re: Data update carryover into next record

A great big THANK YOU to Xavier for his diligence and insight in solving this problem!

 

What it comes down to is that the "call stack" within the ACT! UI during the process that switches from one contact to another is long and complex.  If your code assumes that only 2 events happen, and that they are covered by the ContactChanging and the ContactChanged events, then you are likely to run into a similar process.  What we had to do is put a BeginInvoke in the event handler to cause my plugin's process to be at the bottom of the stack, and force/allow all the ACT! processing to complete before my plugin's logic/action took place.  If you run into a similar "data bleeding" problem with any of your projects, let me know, and I'll show you the before and after code snippets - they may help you solve your problem, too.

 

Again, a big thanks to Xavier.  How do we mark this topic as "solved"?

Geoff

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994