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 before save
virtam
Posts: 43
 
Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 May 08 1:41 PM
Sorry by inglês, i am from Brasil...

How do validation before Save/update. Please help-me.

Byebye
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 May 08 3:01 PM
Funny you should ask because I'm dealing with that myself. My approach was to write a business rule. Then, the first action is Validation Business Rule instead of Business Rule (Save). On Failure "Show Message", on Success select business rule and specify Save.

Here's the thing, I'm trying to validate data entered into a control and I've been looking at the Property. Technically, the data hasn't saved yet, so my validation is not working.

I have no idea how to access a control from a busines rule so I'm stumped at the moment.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 May 08 4:45 PM
You basically create business rules that validate the data and then return a true/false. You tie that up to the UI by using validation rule actions (as Mike mentioned). The entity reference will contain all the values entered in the bound controls. You don't need to access the controls themselves, just the properties bound to them.

Make sense?
[Reply][Quote]
Nicolas Galler
Posts: 93
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 May 08 5:03 PM
The property should be available in the business rule, I have something like this:
if (contactreferringmd.ReferTo == null)
{
errorMessage = "'Refer To' is required.";
}

where ReferTo is bound to a lookup - seems to work fine. I don't know about collections though. And it won't be in the database yet so you can't look at it with ADO.NET.

I have followed the same tactic you did with the Validation Business rule and the OnFail/OnSuccess handlers.
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 8:39 AM
Ryan,

Here's what I was doing wrong. I was referencing ticket.Notes which is valid. Unfortunately, the description control is bound to ticket.TicketProblem.Notes

It seems the most difficult problems always have the simplest solutions.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 9:46 AM
Quote:
Originally posted by Mike Boysen

Here's what I was doing wrong. I was referencing ticket.Notes which is valid. Unfortunately, the description control is bound to ticket.TicketProblem.Notes


Ah, that explains why your business rule was always returning a false then! Glad it is worked out then.

-Ryan
[Reply][Quote]
virtam
Posts: 43
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 5:43 PM
Quote:
Originally posted by Ryan Farley

You basically create business rules that validate the data and then return a true/false. You tie that up to the UI by using validation rule actions (as Mike mentioned). The entity reference will contain all the values entered in the bound controls. You don't need to access the controls themselves, just the properties bound to them.

Make sense?


Ryan,

How i call save, pos validation?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 May 08 5:49 PM
I'm not sure I understand the question. Are you asking how to save the data after performing the validation?
[Reply][Quote]
virtam
Posts: 43
 
Re: Validation before saveYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 May 08 4:36 PM
ok, I thank you already decided
[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 5:41:30 AM