How to find which field is dirty?


Author
Message
lastcanary
lastcanary
StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 270
I have a number of Business Objects on my form. In edit mode, even though I didnt do any change to any field and I try to close the form I get the save confirmation message. I found out that some Business Objects have IsDirty porperty true but I couldnt find out how to detect which fields are dirty.

Could you please help?
Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi,
A BO becomes dirty when you:
  1. Call BO.Edit() or BO.Add
  2. When you assign a value to one of its properties
Most common cases is when you have code in a combobox.SelectedIndexChanged which will be triggered when the form is loading and then if you modify a BO property, the BO.IsDirty will be True.

When the form is closing there is code that will loop through all BOs and check for bo.IsDirty = True and then show you the message.  The solution is review any code where you may be assigning a value to any of the BOs properties and that will fix this issue.

Edhy Rijo

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Add an IsDirtyChanged event to your BOs. Set a break-point to them and run your application. At the time the IsDirty gets changed, your application will enter into debug and then you can check the Call Stack, which will give you the path it went on to "dirty" your BO.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search