Why Does .Save .CheckRules causes Navigated event to fire


Author
Message
Leonard P.
Leonard P.
StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Hi,

I have a form with parent child objects, both objects have required fields defined. I noticed an issue when a user has broken rules in the child and and parent, and clicks Save button, the children controls lose all the changes as though they get refilled.

After digging around and setting a few breakpoints, I found out that calling .Save or .CheckRules on parent BO causes Navigated even to fire (which executes my code to fill children BOs).

Is this by design? Is there a property I can set to prevent this?

Thank you.

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Edhy's suggestion is a good one...but this is by design and correct.  You can set a shared property someplace if you want to take certain considerations into affect when checking rules.  But when a rule is checked, all rows within the BO are evaluated.  This will enforce a navigation so any child logic can take place as well since the CheckRulesOnCurrentRow event will be raised and the strong-typed properties evaluated.

If you do not want to move a child record, etc. then you can go at this several ways.  First, apply a filter to the BO in question so that only the current record is checked.  Second, create a shared property someplace so that the logic in your navigated event doesn't get fired...there are a number of ways to go at this one.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search