﻿<?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?)  » Form Add() -&gt; DeterminedByBusinessObject Parent/Child record add()</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 17:46:30 GMT</lastBuildDate><ttl>20</ttl><item><title>Form Add() -&gt; DeterminedByBusinessObject Parent/Child record add()</title><link>http://forum.strataframe.net/FindPost31235.aspx</link><description>Hello,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I attemp to automate some generic stuff on a Strataframe inherited form...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I have a form that use that inherited form, this form have 2 BOs (boParent, boChild), one depend from another and the relationship are 1-1&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I like to call the form Add() method and this call the Add on each BO (both of them have a vakye if true on "IncludeInFormAdd" and form's IncludeInFormAddType =DeterminedByBusinessObject)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;The problem is that boChild Add &amp;nbsp;is called first and this try to get the pk from the boParent and this still doen't have a record. (current row is null)&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I see that the method GetListOfAddBOs not order the BOs with initpriority order or at least 1st the BOs that not have relationship or are parent...&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I tried to overrides the Add() method on my inherited form (replicating SF Source Code all I can), but FormEditingStateChanged not have a "OnFormEditingStateChanged" method to be called (I use c#, it doen't have a RaiseEvent), SetFocusToControl is private.... it's becoming complicated.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;What is best approach to not to "hardcode"/override the add functionality of both BOs by calling only a method and it do all the work?&lt;br/&gt;&lt;br/&gt;&lt;div&gt;the last stuff that works was to put on the "AfterAddNew" event of the form (with IncludeInFormAddType=PrimaryBusinessObject) an hardcoded "childBO.add()", I trying to not have to make it on each form that I create.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;thanks!</description><pubDate>Wed, 06 Jun 2012 15:00:08 GMT</pubDate><dc:creator>Fabian R Silva, -</dc:creator></item></channel></rss>