BeforeDelete Event Issue


Author
Message
Jeff Pagley
Jeff Pagley
StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)StrataFrame User (465 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Hi SF Team,

When I set the e.cancel  = True  in the BeforeDelete event, it is NOT stopping the Deletion Comfirmation Dialog from showing to the end user.  Although, when the user does click OK, it does NOT delete the record.  

Thanks,

Jeff

Below is the code:

Private Sub CreditMemosBO1_BeforeDelete(ByVal e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs) Handles CreditMemosBO1.BeforeDelete

If CType(Me.CreditMemosBO1.ApprovedByEmployeeID, Int32) > 0 Then

MessageBox.Show("Unable to delete." & vbCrLf & vbCrLf & "The credit memo has been approved.", "System Notification", MessageBoxButtons.OK, MessageBoxIcon.Information)

e.Cancel = True

ElseIf CType(Me.CreditMemosBO1.GLExportByUserID, Int32) > 0 Then

MessageBox.Show("Unable to delete." & vbCrLf & vbCrLf & "The credit memo has been exported to the accounting system.", "System Notification", MessageBoxButtons.OK, MessageBoxIcon.Information)

e.Cancel = True

End If

End Sub


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