﻿<?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 » Business Objects and Data Access (How do I?)  » How to add a Field collection to a BO from related BOs?</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 00:17:20 GMT</lastBuildDate><ttl>20</ttl><item><title>How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17030.aspx</link><description>I have a BO which I would like to have access to 2 more related BOs.&amp;nbsp; The idea is to have a property in the Parent BO to the ChildBO and in this ChildBO to another Child like this:&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;CustomersBO.OrdersBO.OrderItemsBO.ItemPrice&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P dir=ltr&gt;How can I do that for SF Business Object?</description><pubDate>Fri, 13 Jun 2008 20:21:02 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17054.aspx</link><description>Greg, &lt;P&gt;So far, the error has nothing to do with setting values to the created new row.&amp;nbsp; When using BO.NewRow() SF will populate it with the default values which are good enough in my case.&lt;/P&gt;&lt;P&gt;In order to make it work I added a "New" command to initialize the Private BO variable like this:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; _insuranceCompany &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;STRONG&gt;New&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; InsuranceCompanyBO&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Then I made some changes to&amp;nbsp;the property code to make sure the BO is filled all the time, like this:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/FONT&gt;&lt;FONT size=2&gt; [InsuranceCompany]() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; InsuranceCompanyBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;'-- If the private BO has not been created, then create it here.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Is&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; InsuranceCompanyBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.IsNullOrEmpty(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FK_InsuranceCompany) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;_insuranceCompany.FillByPrimaryKey(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FK_InsuranceCompany)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;'-- Check if the BO is empty...&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;'-- Initiailize a new row, default values could be added here if needed.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany.Count = 0 &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;_insuranceCompany.NewRow()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;'-- AcceptChanges on the table, so it isn't dirty (but doesn't save anything to the database)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;_insuranceCompany.CurrentDataTable.AcceptChanges()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;So far the code above is working fine. :)</description><pubDate>Fri, 13 Jun 2008 20:21:02 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17053.aspx</link><description>When you call new row, I think is just adds a new row to the data table, with the values being set to whatever is the default for their type. For strings, that is Nothing (null), hence the error.&lt;br&gt;
&lt;br&gt;
Don't forget the other part of the code, which is to set values of that new row:&lt;br&gt;
[codesnippet]_insuranceCompany.InsuranceCompanyName = String.Empty&lt;br&gt;
...etc.[/codesnippet]&lt;br&gt;
&lt;br&gt;
Do this right after you call NewRow()</description><pubDate>Fri, 13 Jun 2008 19:52:11 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17052.aspx</link><description>Humm, &lt;P&gt;This is getting better :D when changing the code as follow:&lt;/P&gt;&lt;P&gt;[quote][codesnippet]&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; _insuranceCompany &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; InsuranceCompanyBO '--This is at the top of the class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/FONT&gt;&lt;FONT size=2&gt; [InsuranceCompany]() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; InsuranceCompanyBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Is&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; InsuranceCompanyBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.IsNullOrEmpty(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FK_InsuranceCompany) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;_insuranceCompany.FillByPrimaryKey(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FK_InsuranceCompany)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;'-- Check if the BO is empty...&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany.Count = 0 &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;'-- Initiailize a row with appropriate values&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;_insuranceCompany.NewRow()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/FONT&gt;&lt;FONT size=2&gt; _insuranceCompany&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet][/quote]&lt;/P&gt;&lt;P&gt;I now get an error when trying to use this property in a code like this:&lt;/P&gt;&lt;P&gt;[quote][codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Dim&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; x &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.PolicyBO1.InsuranceCompany.CompanyName&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet][/quote]&lt;/P&gt;&lt;P&gt;Look at the attached image for the&amp;nbsp;error: NullReferenceException was unhandled by user code.&amp;nbsp; Object reference not set to an instance of an object.&lt;/P&gt;&lt;P&gt;What I understand about this error is that I would need to create an instance of this object in order to use this property, while when using the original method there was not need to do that, guess because previous method was always creating an instance of the class with this code:&lt;FONT color=#008000 size=2&gt;&lt;/P&gt;&lt;P&gt;Dim loLookupBO As New InsuranceCompanyBO &lt;P&gt;&lt;/FONT&gt;&amp;nbsp;</description><pubDate>Fri, 13 Jun 2008 17:59:51 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17051.aspx</link><description>Yep, I think the adding the blank row would be very easy. First you call NewRow on the BO, which adds a new row based on the table's schema:&lt;br&gt;
&lt;br&gt;
bo.NewRow()&lt;br&gt;
&lt;br&gt;
Then you just set the properties:&lt;br&gt;
&lt;br&gt;
bo.InsuranceCompanyName = "None"&lt;br&gt;
bo.InsuranceCompanyAddress = String.Empty&lt;br&gt;
etc.&lt;br&gt;
&lt;br&gt;
Finally, I'd call AcceptChanges on the table, so it isn't dirty (but doesn't save anything to the database):&lt;br&gt;
&lt;br&gt;
bo.CurrentDataTable.AcceptChanges()&lt;br&gt;
&lt;br&gt;
Easy peasy :D&lt;br&gt;
&lt;br&gt;
I agree that it is amazing how little code is often needed.  Initially I spent something like a 10:1 ratio between learning and coding. Often I'd spend a couple of hours to realize it was one line of code!  :w00t:</description><pubDate>Fri, 13 Jun 2008 17:51:08 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17050.aspx</link><description>Hi Greg, Bill, &lt;P&gt;[quote]Third, on you question about what to do if the BO is empty and having to test it, why not just test it in the property and add the row there? You could initialize the data in that row with values that makes sense when there is no data in the BO.[/quote]&lt;/P&gt;&lt;P&gt;Thanks, the code is pretty understandable.&amp;nbsp; About the third option, this where a function like SCATTER MEMVAR BLANK would do the trick on initializing the empty row, unless I am just missing the simple point on using the BO.NewRow() to have a blank row with no values, so any&amp;nbsp;use of its property will not throw an error.&amp;nbsp; I will test that.&lt;/P&gt;&lt;P&gt;Also thanks for the points about not using the descriptors, you are right and these are not needed for this kind of properties.&lt;/P&gt;&lt;P&gt;All the time I simply get amazed with how functionality that seems pretty difficult or hard to do are accomplish in the .NET world and of course SF with a couple of line of code.:hehe:</description><pubDate>Fri, 13 Jun 2008 16:16:46 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17049.aspx</link><description>Sigh...It fubarred my code:crazy:.  I didn't use html codes...In any case, I hope this is enough to keep you moving!</description><pubDate>Fri, 13 Jun 2008 15:37:34 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17048.aspx</link><description>A couple of thoughts...&lt;br&gt;
&lt;br&gt;
First, I don't think you need to make this a custom field property, with all the attributes. Those are needed if you want to bind the property to a control.  I doubt that you will bind a BO to the property of a control.  So just a normal, public property should work.&lt;br&gt;
&lt;br&gt;
Second, you are creating and filling this BO every time you access the property.  You probably want to think about caching it in a private and only creating it the first time.&lt;br&gt;
&lt;br&gt;
Third, on you question about what to do if the BO is empty and having to test it, why not just test it in the property and add the row there?  You could initialize the data in that row with values that makes sense when there is no data in the BO. Something like:&lt;br&gt;
&lt;br&gt;
[codesnippet]' This holds the value locally, so you don't have to keep recreating it&lt;br&gt;
Private _insuranceCompany As InsuranceCompanyBO&lt;br&gt;
&lt;br&gt;
''' &lt;summary&gt;&lt;br&gt;
''' Returns an instance of the InsuranceCompanyBO&lt;br&gt;
''' filled with data from the current parent record.&lt;br&gt;
''' &lt;/summary&gt;&lt;br&gt;
''' &lt;value&gt;&lt;/value&gt;&lt;br&gt;
''' &lt;returns&gt;&lt;/returns&gt;&lt;br&gt;
''' &lt;remarks&gt;&lt;/remarks&gt;&lt;br&gt;
&lt;Browsable(False)&gt; _&lt;br&gt;
Public ReadOnly Property [InsuranceCompany]() As InsuranceCompanyBO&lt;br&gt;
     Get&lt;br&gt;
       If _insuranceCompany Is Nothing Then&lt;br&gt;
          Dim _insuranceCompany As New InsuranceCompanyBO&lt;br&gt;
          If Not String.IsNullOrEmpty(Me.FK_InsuranceCompany) Then&lt;br&gt;
               _insuranceCompany.FillByPrimaryKey(Me.FK_InsuranceCompany)&lt;br&gt;
          End If&lt;br&gt;
&lt;br&gt;
         '-- Check if the BO is empty...&lt;br&gt;
         If _insuranceCompany.Count = 0 Then&lt;br&gt;
           '-- Initiailize a row with appropriate values&lt;br&gt;
         End If &lt;br&gt;
       End If&lt;br&gt;
       Return loLookupBO&lt;br&gt;
     End Get&lt;br&gt;
&lt;br&gt;
End Property[/codesnippet]&lt;br&gt;
&lt;br&gt;
That is how I'd start in any case, plus using some of Paul's suggestions to keep parent/child BOs in synch.</description><pubDate>Fri, 13 Jun 2008 15:35:54 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17047.aspx</link><description>[quote]I am sure, there should be something I could add to the property code to avoid having to keep testing for the &lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;.PolicyBO1.InsuranceCompany.Count &lt;IMG title=Unsure src="http://forum.strataframe.net/Skins/Classic/Images/EmotIcons/Unsure.gif" align=absMiddle border=0&gt;&lt;/STRONG&gt;&lt;/FONT&gt;[/quote]&lt;/P&gt;&lt;P&gt;Thinking about that, is there a way to have something like the VFP command SCATTER MEMVAR BLANK? that way I could test for the BO.count in the ParentBO and if count = 0, just create a new empty row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think about it?</description><pubDate>Fri, 13 Jun 2008 14:43:03 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17046.aspx</link><description>This stuff sure is fun!!&amp;nbsp; :w00t:&lt;/P&gt;&lt;P&gt;Glad it is working for you...I'll keep my eyes pealed (peeled?)&amp;nbsp;here in case someone does offer a better way of handling this.&lt;/P&gt;&lt;P&gt;Have a great weekend!&lt;BR&gt;Bill</description><pubDate>Fri, 13 Jun 2008 14:42:59 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17045.aspx</link><description>Well, here the working version of my code :D&lt;P&gt;[quote][codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' Returns an instance of the InsuranceCompanyBO&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' filled with data from the current parent record.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&amp;lt;Browsable(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;), _&lt;/P&gt;&lt;P&gt;BusinessFieldDisplayInEditor(), _&lt;/P&gt;&lt;P&gt;Description(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Insurance Company"&lt;/FONT&gt;&lt;FONT size=2&gt;), _&lt;/P&gt;&lt;P&gt;DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)&amp;gt; _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/FONT&gt;&lt;FONT size=2&gt; [InsuranceCompany]() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; InsuranceCompanyBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loLookupBO &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; InsuranceCompanyBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.IsNullOrEmpty(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FK_InsuranceCompany) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loLookupBO.FillByPrimaryKey(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FK_InsuranceCompany)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/FONT&gt;&lt;FONT size=2&gt; loLookupBO&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet][/quote]&lt;/P&gt;&lt;P&gt;And I added this property to my &lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; GetCustomBindablePropertyDescriptors().&amp;nbsp; It was really easy, even though during a debug session I can not really see any property of the PolicyBO.InsuranceCompany object, I would get something like this in the watch window: &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;[quote]&amp;nbsp;&amp;nbsp;Me.PolicyBO1.InsuranceCompany.Count&amp;nbsp;Evaluation of expression or statement timed out.&amp;nbsp;&lt;BR&gt;[/quote]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Also I have to be careful when to use any property of that object since it may not have any data and would throw errors, so I do this:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;[quote]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;STRONG&gt;Me&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;.PolicyBO1.InsuranceCompany.Count&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt;&lt;FONT size=2&gt; x &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt; = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;STRONG&gt;Me&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;.PolicyBO1.InsuranceCompany.CompanyName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Not&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;.IsNullOrEmpty(x) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;MessageBox.Show(x)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/quote]&lt;/P&gt;&lt;P&gt;I am sure, there should be something I could add to the property code to avoid having to keep testing for the &lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;.PolicyBO1.InsuranceCompany.Count :unsure:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thanks again to all of you for pointing me to the right path and if there is a way to improve this, please do not hesitate to let me know.&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 13 Jun 2008 14:07:56 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17044.aspx</link><description>Thanks a log guys,&lt;/P&gt;&lt;P&gt;I will start playing with the info provided right now.....:P</description><pubDate>Fri, 13 Jun 2008 12:43:21 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17043.aspx</link><description>I'm sure there are more ways to do this but&lt;/P&gt;&lt;P&gt;1.) In the&amp;nbsp;parent business objects current data table refilled event, call the child tables fill by parent method.&lt;/P&gt;&lt;P&gt;2.)Either set the auto filter option or filter the record yourself in the parents navigate event. just remember you have filter on it will bite you.&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;1.) Requery the db in the parents navigated event childbo.fillbyparentpk(myparent.pk)</description><pubDate>Fri, 13 Jun 2008 12:36:15 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17042.aspx</link><description>I am not using a parent-child setup.&amp;nbsp; My custom property in my&amp;nbsp;CustomersBO&amp;nbsp;handles the plumbing:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Browsable&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;),&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;BusinessFieldDisplayInEditor&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;(),&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Description&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Customer Orders"&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;),&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DesignerSerializationVisibility&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DesignerSerializationVisibility&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.Hidden)]&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SalesOrdersBO&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; CustomerOrders&lt;BR&gt;&lt;/FONT&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SalesOrdersBO&lt;/FONT&gt;&lt;FONT size=2&gt; mSalesOrders = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SalesOrdersBO&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mSalesOrders.FillAllOrdersByCustomer(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.CustIndex);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; mSalesOrders;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I've tweaked this whole thing several times.&amp;nbsp; I am sure that I will tweak it again.&amp;nbsp; Always finding new, more efficient ways to use StrataFrame. :)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Bill&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 13 Jun 2008 12:30:45 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17041.aspx</link><description>[quote][b]Bill Cunnien (06/13/2008)[/b][hr]Hi Edhy, Hi Greg,&lt;P&gt;I have added a custom property to my customer BO just like you outlined.&amp;nbsp; In my application, I have the CustomersBO.SalesOrdersBO being assigned to the BusinessObject property of a BusinessBindingSource.&amp;nbsp; On the CustomersBO.Navigated event, I simply swap out the related BO:&lt;/P&gt;&lt;P&gt;OrdersBBS.BusinessObject = customersBO.CustomerOrders;&lt;/P&gt;&lt;P&gt;Works like a charm with the DevEx XtraGrid control.&amp;nbsp; To setup the control, I temporarily add a SalesOrdersBO to the form.&amp;nbsp; Assign it to the BBS, then work out how I want the grid to look.&amp;nbsp; After that, I simply remove the SalesOrderBO.&amp;nbsp; I am sure something similar could be done with the next level of BOs, too.&lt;/P&gt;&lt;P&gt;This StrataFrame stuff is rather cool![/quote]&lt;P&gt;Hi Bill,&lt;P&gt;In your case, how do you make the SalesOrdersBO in synch with the CustomerBO? so when you make a reference to a field in the CustomersBO.SalesOrdersBO.ItemPrice it will give you the price of the current selected CustomerBO record.</description><pubDate>Fri, 13 Jun 2008 12:25:52 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17040.aspx</link><description>[quote][b]Greg McGuffey (06/13/2008)[/b][hr]This would just be a normal property of the BO type. Note that this will work fine in code, but not for binding (at this time...there have been some posts about this very thing).&lt;BR&gt;&lt;BR&gt;[codesnippet]Private _parentBO As MyParentBO&lt;BR&gt;Public Proprety ParentBO() As MyParentBO&lt;BR&gt;Get&lt;BR&gt;Return _parentBO&lt;BR&gt;End Get&lt;BR&gt;Set(value As MyParentBO)&lt;BR&gt;_parentBO = value&lt;BR&gt;End Set&lt;BR&gt;End Property[/codesnippet][/quote]&lt;/P&gt;&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;Thanks, but one more question, at some point I need to add code to make the ParentBO property in synch with the current record, where and how to do this?&lt;/P&gt;&lt;P&gt;I understand that in my Parent BO I will add a property to the ChildBO, but I want it to be in synch with the current selected parent record.&amp;nbsp; Also I don't have plans to use this for binding, just to get access to related child record for some custom functions and methods I will have in the BOs.</description><pubDate>Fri, 13 Jun 2008 12:22:31 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17039.aspx</link><description>Wow, Paul!&lt;/P&gt;&lt;P&gt;While writing my response, you posted something even cooler!!&amp;nbsp; :w00t: :w00t: :w00t:&amp;nbsp; I shall be using that!&lt;/P&gt;&lt;P&gt;:smooooth:&lt;BR&gt;Bill</description><pubDate>Fri, 13 Jun 2008 12:15:54 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17038.aspx</link><description>Hi Edhy, Hi Greg,&lt;/P&gt;&lt;P&gt;I have added a custom property to my customer BO just like you outlined.&amp;nbsp; In my application, I have the CustomersBO.SalesOrdersBO being assigned to the BusinessObject property of a BusinessBindingSource.&amp;nbsp; On the CustomersBO.Navigated event, I simply swap out the related BO:&lt;/P&gt;&lt;P&gt;OrdersBBS.BusinessObject = customersBO.CustomerOrders;&lt;/P&gt;&lt;P&gt;Works like a charm with the DevEx XtraGrid control.&amp;nbsp; To setup the control, I temporarily add a SalesOrdersBO to the form.&amp;nbsp; Assign it to the BBS, then work out how I want the grid to look.&amp;nbsp; After that, I simply remove the SalesOrderBO.&amp;nbsp; I am sure something similar could be done with the next level of BOs, too.&lt;/P&gt;&lt;P&gt;This StrataFrame stuff is rather cool!</description><pubDate>Fri, 13 Jun 2008 12:14:08 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17037.aspx</link><description>Actually you can bind to&amp;nbsp;your child business object's fields you just can't use the&amp;nbsp;type editor to pick the binding field and business object, if you set the&amp;nbsp;binding in code it works.&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.TxtSuperVisor.BindingField = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"JBO_Supervisor"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.TxtSuperVisor.BusinessObject = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoCustomers.JobSiteBusinessObject&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;[/codesnippet]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Fri, 13 Jun 2008 12:13:12 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: How to add a Field collection to a BO from related BOs?</title><link>http://forum.strataframe.net/FindPost17036.aspx</link><description>This would just be a normal property of the BO type.  Note that this will work fine in code, but not for binding (at this time...there have been some posts about this very thing).&lt;br&gt;
&lt;br&gt;
[codesnippet]Private _parentBO As MyParentBO&lt;br&gt;
Public Proprety ParentBO() As MyParentBO&lt;br&gt;
  Get&lt;br&gt;
    Return _parentBO&lt;br&gt;
  End Get&lt;br&gt;
  Set(value As MyParentBO)&lt;br&gt;
    _parentBO = value&lt;br&gt;
  End Set&lt;br&gt;
End Property[/codesnippet]</description><pubDate>Fri, 13 Jun 2008 11:34:07 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>