| | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 11:22:52 AM Posts: 374, Visits: 1,882 |
| It appears that when a row is placed in editing state using a standard SF maintenance window the row’s IsDirty property is set to true even if no fields are modified. I’m using the primary BO on the form only to retrieve another BO that I wish to edit. I’m not making any changes to the primary BO. To get around the issue of having the framework prompt me with a “do you wish to save…” message I’m using the primary BO’s BeforeSave event to do an Undo on the primary BO’s current row. This allows the “save message” to be automatically be displayed for the other object but not the primary. It would seem that the row shouldn’t be set dirty if no fields were modified. Is this by design or is it a bug? -Larry |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| | That functionality is by design, actually. When you call edit on the business object, the current DataRow is automatically set to Modified. The reason for this is that the business rules are never checked unless the record is in a modified state. So, to force the business rules check when a record is edited, it first had to be set to modifed. I'll look into some other ways for you to get around that functionality.
www.bungie.net |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| I added a SetDirtyOnEdit Boolean property to BusinessLayer that defaults to False. It functions just like the method implies: If it's True, then the record is set to dirty when Edit() is called; if it's set to False, the record is not set to dirty when Edit() is called, but rather waits until some data has changed.
It will be available in the next release.
www.bungie.net |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 11:22:52 AM Posts: 374, Visits: 1,882 |
| Thanks! I like it -Larry |
| |
|
|