﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Second BO not included in Form Save</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 06 May 2026 02:00:40 GMT</lastBuildDate><ttl>20</ttl><item><title>Second BO not included in Form Save</title><link>http://forum.strataframe.net/FindPost32428.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I have a maintenance form that maintains a primary bo named boPromo. When in Edit mode the user can click a button to load details into a second bo boPromoDetails. &amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;The form "IncludeInFormEditType","IncludeInFormSaveType" and "IncludeInFormUndoType" properties are set to "DeterminedByBusinessObject" .&lt;div&gt;The form "IncludeInFormAddType","IncludeInFormDeleteType" and "IncludeInFormNavigateType" properties are set to "PrimaryBusinessObject"&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;boPromo has all the "IncludeInForm..." properties set to True.&lt;div&gt;&lt;div&gt;boPromoDetails has "IncludeInFormSave" and "IncludeInFormUndo" set to True.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;boPromoDetails is not being included in the form Save. If I set a breakpoint in the form BeforeSave then boPromodetails.isDirty = true.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;A breakpoint in the &amp;nbsp;boPromoDetails.BeforeSave handler is not fired.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;If I code &amp;nbsp;a boPromoDetails.Save() in the form.BeforeSave then &amp;nbsp;boPromoDetails.BeforeSave handler is &amp;nbsp;fired and the details are saved correctly.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;What am I missing here?&lt;br/&gt;&lt;br/&gt;&lt;div&gt;TIA,&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Andy</description><pubDate>Thu, 13 Feb 2014 18:13:02 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: Second BO not included in Form Save</title><link>http://forum.strataframe.net/FindPost32437.aspx</link><description>I located my problem:&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;1. In the boPromotion.Navigated event I was filling boPromotionDetails with records relating to boPromotion.&lt;div&gt;&lt;br/&gt;&lt;div&gt;2. boPromotion.Navigated is being fired by the form save before boPromotionDetails was being saved, as a result boPromotionDetails.IsDirty became false and no save was performed. I can get around this by checking the form EditingState in boPromotion.Navigated &amp;nbsp;before repopulating boPromotionDetails.&lt;div&gt;&lt;br/&gt;&lt;div&gt;This raises the question as to when to populate related BOs. In the Enquiry only &amp;nbsp;forms that I have developed so far I have always repopulated any child BOs in the parent bo.Navigated event.&amp;nbsp;&lt;div&gt;In order to use the ChildAutoFilter = MatchCurrentRow on the child BO, from my testing the child BO must first be populated with all the records relating to records in the parent BO.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Am I missing something here? I am interested to hear what others are doing,&lt;br/&gt;&lt;br/&gt;&lt;div&gt;TIA&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Andy</description><pubDate>Thu, 13 Feb 2014 18:13:02 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: Second BO not included in Form Save</title><link>http://forum.strataframe.net/FindPost32436.aspx</link><description>No, but if they are related you will want to tie them together.&amp;nbsp; This is important to maintain the integrity of a parent-child relationship.&amp;nbsp; If this isn't a parent-child relationship, then there is something else in the mix.&amp;nbsp; To clear things up, if you can create a quick sample of your problem that could help also.</description><pubDate>Thu, 13 Feb 2014 17:24:28 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Second BO not included in Form Save</title><link>http://forum.strataframe.net/FindPost32435.aspx</link><description>Thanks Trent,&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I will try establish the relationship and test. More generally, does this mean that a relationship has to be established to save more than 1 BO at a time?&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Best regards Andy</description><pubDate>Thu, 13 Feb 2014 17:10:05 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item><item><title>RE: Second BO not included in Form Save</title><link>http://forum.strataframe.net/FindPost32431.aspx</link><description>Do you have a relationship setup between the two business objects?&amp;nbsp; When you set the ParentBusinessObject property on the child, it will then make sure that all propagations happen in the right order.&amp;nbsp; </description><pubDate>Thu, 13 Feb 2014 10:50:22 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>