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: Insert activity, how to display messagebox instead of red asterisk for required fields?
NixDev
Posts: 98
 
Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 10 2:40 PM
Hi all,
I'm doing some customizations in insert activity form. Currently, when you want to save the activity, if there are empty required fields, a red asterisk is displayed next to them. The problem is that since activity screen it's a tabbed interface, sometimes the user clicks ok and nothing happens seemingly for no reason...and it's because a required field is missing in a tab other than the currently active tab.

This is quite unintuitive, is there a way to display a messagebox telling the user "this or that field are required"? I imagine SLX uses standard .net validators, so it should be easy right?

Any ideas?
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 10 3:25 PM
Generally, I like to code a Validate business rule on the entity that I call in the pre-execute steps of the OnBeforeInsert and OnBeforeUpdate events for that entity. You can validate the fields and call "throw new Sage.Platform.Application.ValidationException("Your Message Here");" to prevent the save (and dialog close) from happening. This will pop up a message box with whatever text you specify.

The added advantage here is that the rule is enforced from everywhere - even SData calls.
[Reply][Quote]
NixDev
Posts: 98
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 10 11:22 AM
Thanks for the reply Mike! Your solution is more or less what I use to do for the same reasons you mention (ensuring that the validation BRs are enforced no matter where the entity is created from etc).

The problem in this case is that there's some client side validation running on the Activity detail form (I assume JS?), so the page isn't even posted back to the server, which would trigger the onbeforeinsert event and do what you describe...makes sense? So, what I need to do is to modify that client side validation to display a message, but i don't even know where that code is...
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Jun 10 12:26 PM
There is at least 1 required field on the form - StartDate. If you open the ActivityDetails.ascx file under Portal Manager -> SalesLogix -> SupportFiles -> SmartParts -> Activity and search for the text 'required', you will find fields that use client side validation (the text "Required=true" appears in the control definition). You can turn these off if you want to do it server side. That should be all you need to do. Note you will have to repeat this each time you upgrade to a version that contains this object. I do not believe that fields on any of the other tabs are required.
[Reply][Quote]
NixDev
Posts: 98
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 10 12:21 PM
Hi Mike. Do you know if the validation routine uses standard ASP.NET validators? I ask because they are pretty easy to customize to bring up the messagebox i'm looking for. My client wants client-side validation (hence, i cannot just "get rid" of the validation by taking out the required=true), but wants a messagebox instead of just the red asterisk. Makes sense?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 10 1:17 PM
Sorry, late to the party

Anyway, take a look at this post http://customerfx.com/pages/crmdeveloper/2007/12/17/making-required-fields-more-visible-for-saleslogix-7-2-web.aspx

In that post I describe how to add ASP.NET ValidationSummary components to the page so you can do a message box for missing required fields without adding any code.
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 10 1:23 PM
You can add validators if you want - you just have to code them. Right now, there is just the standard required field validator that's implicitly called by the Required=True. I would replace that with an ASP validator control and generate an alert on failure. I don't think you'll be able to do an alert strictly on the client side, so you may have to validate on the server side and generate the JScript. However, you can put any text in there, so a message such as a red "Start Time is Required" is a lot easier to see than an asterisk.
[Reply][Quote]
Mike LaSpina
Posts: 116
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Jun 10 1:34 PM
What Ryan said! That's an elegant solution Ryan!
[Reply][Quote]
NixDev
Posts: 98
 
Re: Insert activity, how to display messagebox instead of red asterisk for required fields?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jun 10 11:23 AM
Way to go Ryan, thanks! I knew it should be easier than it seemed...
[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 5:17:13 AM