Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Business Rule error message handling
Tony Joanes
Posts: 71
 
Business Rule error message handlingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jul 09 10:40 AM
I am writing a simple validation business rule but am unsure on how to raise an error to display in the client.

The ContactDetails form already has a business rule HasPropgationChanges but I want to add additional rules onto this before saving. Only problem is that you can only have the one business rule so I can't set another with a "Show Message" option.

Whats the best way to handle displaying messages to users about various validation points on a form?
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Business Rule error message handlingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jul 09 2:56 PM
Tony,
I will typically throw an exception in a validation business rule. This will pop a message to the user and terminate further execution:

throw new Sage.Platform.Application.ValidationException("MyField is required");

I would then set the save button to call the validation rule followed by the save method. If any exceptions occur, the save won't fire.
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: Business Rule error message handlingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jul 09 4:56 AM
Thanks, that will work for me.

-Tony
[Reply][Quote]
Alberto Chiesa
Posts: 49
 
Re: Business Rule error message handlingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jul 09 11:12 AM
Why throw an exception in the first place if you can simply return false and setup a ShowMessage action for OnFailure?

Am I missing something?
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: Business Rule error message handlingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jul 09 11:20 AM
Because I want the message to state what the problem was.

The ShowMessage action only seems to allow a restricted message which wouldn't be related to what the error was.

You can only have one business rule with a show message action
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 11:16:17 AM