﻿<?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?)  » Sql Unique constraint</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 17:01:56 GMT</lastBuildDate><ttl>20</ttl><item><title>Sql Unique constraint</title><link>http://forum.strataframe.net/FindPost827.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;What is the preffered way to handle unique constraints in SF? If I attempt to save a dupe SF returns the Big Bad Error box which is fine but I would like to give the user a little better message. For now&amp;nbsp;I just added a method to check the value in&amp;nbsp;the BO's broken rules method&amp;nbsp;and that seems to work fine however&amp;nbsp;it does mean that&amp;nbsp;the check&amp;nbsp;is being performed twice.&lt;/P&gt;&lt;P&gt;Can I trap for this&amp;nbsp;exception and display an alternate message?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;nbsp;&amp;nbsp;</description><pubDate>Thu, 20 Apr 2006 13:08:52 GMT</pubDate><dc:creator>Nikki Chase</dc:creator></item><item><title>RE: Sql Unique constraint</title><link>http://forum.strataframe.net/FindPost847.aspx</link><description>Hi Nikki,&lt;P&gt;The problem when you start working with a new framework in a new technology is that there is sooooo much to take in, even if the answer was painted across your forehead, you probably wouldn't see it :)&lt;/P&gt;&lt;P&gt;So, take a rest from your heavy (last) weekend of framework analysis and get ready for the coming weekend and you can start all over again :w00t:&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;-=Gary</description><pubDate>Thu, 20 Apr 2006 13:08:52 GMT</pubDate><dc:creator>Gary Wynne</dc:creator></item><item><title>RE: Sql Unique constraint</title><link>http://forum.strataframe.net/FindPost843.aspx</link><description>Gary knows what he is talking about ;)</description><pubDate>Thu, 20 Apr 2006 10:22:44 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Sql Unique constraint</title><link>http://forum.strataframe.net/FindPost841.aspx</link><description>Thanks Gary!&lt;/P&gt;&lt;P&gt;That makes perfect sense I just didn't see it in the docs but then again I was probably a little cross eyed.</description><pubDate>Thu, 20 Apr 2006 09:05:09 GMT</pubDate><dc:creator>Nikki Chase</dc:creator></item><item><title>RE: Sql Unique constraint</title><link>http://forum.strataframe.net/FindPost830.aspx</link><description>Hi Nikki&lt;/P&gt;&lt;P&gt;From the Business Object Events Overview in the documents:-&lt;/P&gt;&lt;P class=TableText&gt;The &lt;SPAN style="FONT-STYLE: italic"&gt;ErrorSaving&lt;/SPAN&gt; event is raised only when an exception occurs on the server while executing a Save operation. &amp;nbsp;The exception displayed here originates from the server and provides the developer with detailed information as to why the query or save operation failed. &amp;nbsp;This is extremely beneficial to the developer, especially when initially programming the business objects. &amp;nbsp;Since the detailed error that occurred on the server is brought all the way to the form level, this releases the developer from step-by-step debug sessions to determine why the query failed. &amp;nbsp;By default, a StrataFrame form will automatically display any save errors to the end-user. &amp;nbsp;To prevent this message from being displayed to the end-user, the &lt;SPAN style="FONT-STYLE: italic"&gt;AutoShowSavingErrors&lt;/SPAN&gt; property on the form must be set to &lt;SPAN style="FONT-STYLE: italic"&gt;False&lt;/SPAN&gt;.&lt;/P&gt;&lt;P class=TableText&gt;So, you can test and handle the ErrorSaving event and surpress the big-bad error by setting the AutoShowSavingErrors property to false.&lt;/P&gt;&lt;P class=TableText&gt;HTH&lt;/P&gt;&lt;P class=TableText&gt;-=Gary</description><pubDate>Thu, 20 Apr 2006 08:19:44 GMT</pubDate><dc:creator>Gary C Wynne</dc:creator></item></channel></rss>