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
Aaron Young
Aaron Young
Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Sounds like your biggest problem here is the overhead in filling your child BOs. I would also recommend putting a check in your fill code so that you only do the fill when the parent has changed. Check the parent's primary key against the child's foreign key and if they are the same there is probably no need to run the fill. When you move to a different parent record, the keys will not match and the fill will be triggered.

I would recommend this anyway as it will cut out unnecessary server data operations.

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