﻿<?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?)  » BO loses datasource in Custom property</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 19 May 2026 22:03:52 GMT</lastBuildDate><ttl>20</ttl><item><title>BO loses datasource in Custom property</title><link>http://forum.strataframe.net/FindPost32936.aspx</link><description>&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;Hi,&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;I am wondering if anyone has seen the behaviour where a business object has lost its datasource in the get code for a custom property?&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;Using the debugger if I set a breakpoint in a fill method me.DataSourceKey contains the value set at form design time in the BO’s properties sheet. &lt;/font&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;If I set a breakpoint in the Get code of a custom property, me.DataSourceKey is empty. This behaviour seems to relate to this specific form which is instantiated via reflection from a data driven menu system used by our application. I have checked the source code and can find no statements that change the BO.DataSource. Explicitly setting the BO datasource in the form load makes no difference to the behaviour.&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;I created a simple project consisting of a standard strataframe maintenance form using the BO in question from the same BO library and the BO datasource is set correctly in the Get code and everything works as expected. It is not feasible to post an example of the problem form due to the complexity of the form and its calling environment.&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;I have kludged a work around in the problem form but am interested in any thoughts or suggestions.&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;TIA &lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;Andy &lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;p style="margin: 0cm 0cm 0pt;"&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#000000" face="Times New Roman" size="3"&gt;&lt;/font&gt;</description><pubDate>Thu, 16 Apr 2015 23:38:57 GMT</pubDate><dc:creator>Andrew Harper</dc:creator></item></channel></rss>