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: Required Field on the Insert Account screen in 7.5 web... (Newbie?)
Byrnes
Posts: 43
 
Required Field on the Insert Account screen in 7.5 web... (Newbie?)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Oct 08 2:36 PM
What's the cleanest way to force a required field on the insert account form?

I tried editing the OnBeforeInsert business rule for the Account entity, but if I enter my own C# snippet it disables the one that's out of the box - which I'm guessing I don't want to do....

My goal is to prevent the save/insertion of the account until field X has a value in it.

I see this is already done with the Account name field, but I can't find where this is done....

thanks,

Byrnes
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Required Field on the Insert Account screen in 7.5 web... (Newbie?)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Oct 08 3:04 AM
You could do on a code snippet on the INsertAccount quickform - (not in a business rule), and check the value. If it is blank, do a dialog showmessage, else save the record and post the form.

I.e:

Sage.Entity.Interfaces.IAccount _entity = BindingSource.Current as Sage.Entity.Interfaces.IAccount;
if (_entity != null)
{
if(_entity.VALUE == "")
{
dialog.ShowMessage("ENTER VALUE ");
} else
{
_entity.Save();
btnSave_ClickActionBRC(sender, e);

}
}
}
protected void btnSave_ClickActionBRC(object sender, EventArgs e) {
Response.Redirect(string.Format("Account.aspx?entityId={0}", (this.BindingSource.Current as Sage.Platform.ComponentModel.IComponentReference).Id));


I havent checked the syntax.....if you paste this exactly in as the c# code snippet to run when the save button is clicked - ignore the fact there is no closing } - SLX will put this in for you.

You could also change the property in App Architect to not allow nulls - this may do the trick (havent tried this though). (Double click the property, set Is Nullable to false).
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Required Field on the Insert Account screen in 7.5 web... (Newbie?)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Oct 08 11:31 AM
Nick, that is an awesome trick, adding a second method in the snippet and leaving the end bracket off. Thanks for that!
-Ryan
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Required Field on the Insert Account screen in 7.5 web... (Newbie?)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Oct 08 4:31 AM
Thanks! I must admit its come in handy more than a few times - especially when I want to make the source of a datagrid a SQLDataSource, but ensure I can still work with a quickform!! And loads of other workarounds like that (dynamic comboboxes etc.)

[Reply][Quote]
Kevin
Posts: 2
 
Re: Required Field on the Insert Account screen in 7.5 web... (Newbie?)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Aug 09 12:40 PM
Im new to Saleslogix. can someone explain to me where on the quick form I would go to enter this code.
[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 7:31:20 AM