7/5/2025 1:30:37 PM
|
|
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!
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.
|
|
|
|
Required Field on the Insert Account screen in 7.5 web... (Newbie?)
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
|
|
|
|
Re: Required Field on the Insert Account screen in 7.5 web... (Newbie?)
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).
|
|
|
| |
| |
| |
|
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!
|
|
|
|
|
|
|
|