Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 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: Validation Business Rule - Message Box
Jerry
Posts: 3
 
Validation Business Rule - Message Box Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Jun 08 4:16 PM
I'd like to perform various validations before saving an entity. If any of the validations fail, i want it to be displayed as a Message Box (not dialog form). How can i achieve this?
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Validation Business Rule - Message Box Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 08 3:48 AM
The following will work on the insert opp screen - change it for the other entities and screens. Hopefully it should give you the idea...

Sage.Entity.Interfaces.IOpportunity entity = this.BindingSource.Current as Sage.Entity.Interfaces.IOpportunity;
Sage.Platform.Orm.Interfaces.IPersistentEntity persistentEntity = this.BindingSource.Current as Sage.Platform.Orm.Interfaces.IPersistentEntity;
String validationString = "";

if (persistentEntity != null)
{
if (entity.EstimatedClose.ToString() == null | entity.EstimatedClose.ToString() == "")
{
validationString += "<li><b>";
validationString += "Estimated Close" + "</b></li>";
}

if (validationString == "")
{
persistentEntity.Save();
Response.Redirect(string.Format("Opportunity.aspx?entityId={0}", (this.BindingSource.Current as Sage.Platform.ComponentModel.IComponentReference).Id));
}
else
{
this.DialogService.ShowMessage("<div style=color:red><b> Please enter the following fields:</b></div>" + "<br><ul>" + validationString + "</ul>" + "<br><div style=color:red>(Fields marked with a * are mandatory)</div>");
}
}


etc....
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Validation Business Rule - Message Box Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 08 3:49 AM
Some of the above markup has been a bit screwed up! Should make sense though hopefully!
[Reply][Quote]
Jerry
Posts: 3
 
Re: Validation Business Rule - Message Box Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 08 4:52 AM
Thanks for your help Nick.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Validation Business Rule - Message Box Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 08 1:22 PM
Hi Jerry,

Perhaps this post here might help with this as an alternate approach: http://customerfx.com/pages/crmdeveloper/2007/12/17/making-required-fields-more-visible-for-saleslogix-7-2-web.aspx

-Ryan
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Validation Business Rule - Message Box Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 08 1:23 PM
Oops, misread what you were after. Sorry.
[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): 2/23/2025 10:06:57 AM