Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Rules and Default Values don't work!?
Message
From
24/05/2005 17:07:04
Dave Porter
Medical Systematics, Inc.
Merced, California, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01016948
Message ID:
01017286
Views:
19
		protected override void HookSetDefaultValues(DataRow dataRow)
		{
			dataRow["Valid"] = "Y";
		}
Hi Mike,
This does work and does make sense, so thanks for that. The way I was trying to do it is my attempt to copy what is in the Jump Start, I must have foobarred that.

>>>Yes the CheckForDuplicateICDACode code gets executed...
>So your rule is getting checked, but it's not "being reported", right?
Right!

What I need is a 'before save' check, because now I'm getting an
Application Exception Occured!
Column 'ICDACode' is constrained to be unique. Value '8888' is already present.

So I'll go back to the help...
Dave

>>>what is the line of code in the Jump Start that saves the business object?
>
>This is what you need to investigate. Totally guessing, but if your rule is getting checked, and you're not getting your broken rules "reported", your probably using something like businessObject.Save(). Note that the save will return a mmSaveDataResult object. Inspect this and see if it's "RulesBroken", "RulesPassed" etc. The mmSaveDataResult enumeration is documented, I think, if not, check out the MM code.
>
>If you want to be shown broken rules automatically, use the mmBusinessForm.Save() method - again check out the help for the difference.
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform