Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, June 30, 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: Any way to return values to Show Message from a business rule?
Andy Norris
Posts: 39
 
Any way to return values to Show Message from a business rule?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 08 8:22 AM
We have a few validation rules around the submit of a form on the 7.2.2 web portal (no blank description, must have a related object linked). Currently I have a validation business rule which returns a message if it fails and on success it fires a second validation rule which also returns a message if it fails and saves the record on success.

What I would like to do in this scenario is to have the business rule check both/all validation events and return a message to the Show Message event with the appropriate failure message. Has anyone any insight on something like that?
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Any way to return values to Show Message from a business rule?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 08 2:29 PM
I just answered this over on IT-Toolbox so I thought that I would answer it here to:

I wouldn't try and use ShowMessage. If you look at some of the pre-canned rules (using Reflector), you will see that they will throw a ValidationException which will produce a message box:

throw new Sage.Platform.Application.ValidationException("There is a problem here!");



Stephen
www.slxmaster.com
[Reply][Quote]
Andy Norris
Posts: 39
 
Re: Any way to return values to Show Message from a business rule?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 08 3:08 PM
But while that suggestion will work, it does not allow one to specify the title on the validationexception dialog. We're a little picky about branding, so we'd rather not have the default "Sage Saleslogix" on a data validation dialog message. Maybe I'll poke around and see where that resource is coming from so I can change it.

Thanks for the reply (both here and there).
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Any way to return values to Show Message from a business rule?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 08 3:21 PM
Instead of using the ValidationRule action you can use a C# snippet action. Then you just call the validation rules in code and display the message yourself. Something like this:

if (myentity.Rule1() && myentity.Rule2())
{
DialogService.ShowMessage("The validation rules did not pass. Tell the user something here");
}



BTW, what are you doing on ITToolbox? Don't you know this is the place to get all the good info?
[Reply][Quote]
Andy Norris
Posts: 39
 
Re: Any way to return values to Show Message from a business rule?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Sep 08 3:31 PM
Yes, that's more along the lines of what I'm looking for. I just need to confirm that the redirect to the newly created entity (ticket, in this case) happens as it would with a regular validation business rule wrapped around this all. Thanks, Ryan.

As for ITToolbox, well, sometimes you catch twice as many fish with two nets.
[Reply][Quote]
Sebastian Walter
Posts: 28
 
Re: Any way to return values to Show Message from a business rule?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Mar 10 9:50 AM
What do I have to do to sign that this is an Information or a Question? Or am I not able to do that?
[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): 6/30/2025 6:35:15 PM