BO IsDirty Property


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Thanks! I like itSmile

-Larry

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

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

 

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