BeforeDeleteEventArgs


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Oh, I follow what you are saying.  Thanks for pointing this out...we will get it fixed.
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
I realize the the method that I referenced in my previous post in not the overload that includes the OnlyMarkAsDeleted parameter. I was just trying to point out that the documentation doesn't agree with the code. The following quote is from the developer guide.

"DeleteCurrentRow() - When this overload is called, the record being deleted is immediately removed from the server and the internal data table is updated."

-Larry

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The method you placed in the previous post was not the overload that respects the "OnlyMarkAsDeleted" parameter.  By default, the record is only marked as deleted, not smoked from the server until the Save is called.  But regardless, I agree with the event arguments.  This is an easy fix and we will get it in the official release of 1.4.1.

Thanks for your input! Smile

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
Looking at the source code, it would seem that the easiest thing to do would be to add the OnlyMarkAsDeleted parameter of the DeleteCurrentRow method as a ReadOnly property on the BeforeDeleteEventArgs.

Also the Developer's Guide states the DeleteCurrentRow() deletes the record from the server immediately. However when I look at the source code

Public Function DeleteCurrentRow() As Integer
      Return DeleteCurrentRow(False, True)
End Function

CheckSecurity is being set to False and OnlyMarkAsDeleted is being set to True.

-Larry


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Good suggestion. Smile
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

I'd like to see a property added to the BeforeDeleteEventArgs to indicate if the delete is deferred (marked as deleted) or immediate. I’d like to be able to add some code to the BO to delete related records in other tables. Since a record marked as deleted can be undone I would want to wait and delete the related records in the BeforeSave event handler of the BO. If the BO is being deleted immediately I need to delete the related records in the BeforeDelete event of the BO to avoid constraint errors.

-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