﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » BeforeDelete</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 12:02:35 GMT</lastBuildDate><ttl>20</ttl><item><title>BeforeDelete</title><link>http://forum.strataframe.net/FindPost7946.aspx</link><description>Morning, all. Just a quick question about the use of the BeforeDelete event for business objects.&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
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?&lt;br&gt;
&lt;br&gt;
Thanks in advance,&lt;br&gt;
Adam</description><pubDate>Fri, 06 Apr 2007 20:13:18 GMT</pubDate><dc:creator>adamb</dc:creator></item><item><title>RE: BeforeDelete</title><link>http://forum.strataframe.net/FindPost7954.aspx</link><description>That was it :)&amp;nbsp; We took Good Friday off, so I am just checking in, but it seems that you got it figured out.&amp;nbsp; Thanks, Greg. ;)</description><pubDate>Fri, 06 Apr 2007 20:13:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BeforeDelete</title><link>http://forum.strataframe.net/FindPost7952.aspx</link><description>Excellent.  :D</description><pubDate>Fri, 06 Apr 2007 13:00:16 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: BeforeDelete</title><link>http://forum.strataframe.net/FindPost7951.aspx</link><description>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.&lt;br&gt;
&lt;br&gt;
Thanks again!</description><pubDate>Fri, 06 Apr 2007 12:53:27 GMT</pubDate><dc:creator>adamb</dc:creator></item><item><title>RE: BeforeDelete</title><link>http://forum.strataframe.net/FindPost7950.aspx</link><description>Greg,&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
- Adam</description><pubDate>Fri, 06 Apr 2007 12:30:40 GMT</pubDate><dc:creator>adamb</dc:creator></item><item><title>RE: BeforeDelete</title><link>http://forum.strataframe.net/FindPost7948.aspx</link><description>Adam, &lt;br&gt;
&lt;br&gt;
I seem to recall that the confirmation happens after BeforeDelete...i.e. the sequence is:&lt;br&gt;
&lt;br&gt;
BeforeDelete (which you can cancel)&lt;br&gt;
SF Confirmation&lt;br&gt;
Record deleted&lt;br&gt;
AfterDelete&lt;br&gt;
&lt;br&gt;
To check this, just add the BeforeDelete and AfterDelete event handlers, put a break in BeforeDelete and observe what happens.&lt;br&gt;
&lt;br&gt;
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.</description><pubDate>Fri, 06 Apr 2007 12:14:59 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>