BeforeDelete


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
That was it Smile  We took Good Friday off, so I am just checking in, but it seems that you got it figured out.  Thanks, Greg. Wink
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Excellent. BigGrin
adamb
adamb
StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)
Group: Forum Members
Posts: 6, Visits: 39
It looks like deletion confirmation can be turned off by changing the "AutoShowDeleteConfirmation" property in the form itself to false. Turning this off and providing my own confirmation solved the problem and now the functions in the secondary business objects only fires when the user confirms the deletion.



Thanks again!
adamb
adamb
StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)
Group: Forum Members
Posts: 6, Visits: 39
Greg,



I believe one can turn the deletion confirmation off, which I'll look into. If so, it solves my problem pretty easily. Thanks for the tip.



- Adam
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Adam,



I seem to recall that the confirmation happens after BeforeDelete...i.e. the sequence is:



BeforeDelete (which you can cancel)

SF Confirmation

Record deleted

AfterDelete



To check this, just add the BeforeDelete and AfterDelete event handlers, put a break in BeforeDelete and observe what happens.



Obvisously, the place to handle what you want is in the BeforeDelete, but you'd need to provide your own confirmation. Of course, you'd also need to turn off SF confirmation. I don't know how/if you can turn off the SF confirmation though.
adamb
adamb
StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)
Group: Forum Members
Posts: 6, Visits: 39
Morning, all. Just a quick question about the use of the BeforeDelete event for business objects.



I'm using the standard delete button as provided by the MaintenanceFormToolStrip, which triggers the BeforeDelete event of my primary business object. What I need to happen in the event is this: If the user confirms the delete by choosing "yes" from the dialog that comes up, functions in other business objects must first occur, and then the deletion in the main business object happens.



My trouble is the fact that those functions in other business objects are called no matter what before dialog comes up, so even if the user clicks "no", the functions have been run. I was under the impression that the BeforeDelete event would be triggered only when the user confirmed the deletion and not merely when the delete button was clicked. Is there a standard way to handle this?



Thanks in advance,

Adam
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