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.
>