﻿<?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?)  » Error Saving not firing</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 00:28:36 GMT</lastBuildDate><ttl>20</ttl><item><title>Error Saving not firing</title><link>http://forum.strataframe.net/FindPost16328.aspx</link><description>I have a BO declared as&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;WithEvents&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;&amp;nbsp;BO &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; BOLIB.BO = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; BOLIB.BO&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;I add records, then set ErrorSavingMode to ContinueOnError&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;BO.ErrorSavingMode = MicroFour.StrataFrame.Business.ErrorSavingOptions.ContinueOnError&lt;/P&gt;&lt;P&gt;Calls to BO.SAVE() fail, but ErrorSaving does not fire to tell me what is going wrong. I added code to other methods on the BO (AfterAddNew) and they fire as expected, what might be causing ErrorSaving not to fire? &lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Tue, 13 May 2008 09:42:23 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Error Saving not firing</title><link>http://forum.strataframe.net/FindPost16363.aspx</link><description>[quote]&lt;TABLE cellSpacing=0 cellPadding=0 width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=smalltxt vAlign=top&gt;&lt;SPAN id=ctl02_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl08_lblFullMessage&gt;Hmm I had broken rules, so if broken rules exist that trumps ErrorSaving?&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;[/quote]&lt;/P&gt;&lt;P&gt;Yes, but you can handle the BusinessRulesChecked event and set the e.IgnoreRulesAndForceSave to True and any rules will be ignored....if you have this need.&lt;/P&gt;&lt;P&gt;[quote]&lt;TABLE cellSpacing=0 cellPadding=0 width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=smalltxt vAlign=top&gt;&lt;SPAN id=ctl02_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl08_lblFullMessage&gt;Can I easily display the BrokenRules collection to the user if the BO is not the forms PrimaryBusinessObject or will I have to code for that?&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;[/quote]&lt;/P&gt;&lt;P&gt;Sure, we do this in our medical app so that they can tell when there are broken rules on other pages as well as on web applications.&amp;nbsp; You can just enumerate the BrokenRules collection (either on the BO or in the BusinessRulesChecked event)&lt;/P&gt;&lt;P&gt;[codesnippet]Dim msg As String = ""&lt;BR&gt;For each rule as BusinessRules in MyBo.BrokenRules.ToArray()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg &amp;amp;= rule.FieldName &amp;amp; ControlChars.CrLf &amp;amp; rule.Description&lt;BR&gt;Next[/codesnippet]</description><pubDate>Tue, 13 May 2008 09:42:23 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error Saving not firing</title><link>http://forum.strataframe.net/FindPost16335.aspx</link><description>Keith, &lt;br&gt;
&lt;br&gt;
I'm not sure on this, but I'd check out the SaveByForm() method of the BO.  The broken rules handling is done by the standard form, so if the BO is on the form, I think using the SaveByForm() method will get the broken rules shown.</description><pubDate>Mon, 12 May 2008 12:38:41 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Error Saving not firing</title><link>http://forum.strataframe.net/FindPost16331.aspx</link><description>Can I easily display the BrokenRules collection to the user if the BO is not the forms PrimaryBusinessObject or will I have to code for that?</description><pubDate>Mon, 12 May 2008 10:50:24 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Error Saving not firing</title><link>http://forum.strataframe.net/FindPost16330.aspx</link><description>Hmm I had broken rules, so if broken rules exist that trumps ErrorSaving?</description><pubDate>Mon, 12 May 2008 10:28:30 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item></channel></rss>