﻿<?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?)  » Error creating custom BO property</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 04:37:54 GMT</lastBuildDate><ttl>20</ttl><item><title>Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14575.aspx</link><description>I'm getting an error "Object reference not set to an instance of an object." in the FieldPropertyDescriptor code and cannot figure it out.&amp;nbsp; Maybe a second pair of eyes will help.&amp;nbsp; I'm pretty sure it is copied straight from the Help.&lt;P&gt;(This code is in my StaffBO.vb.)&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Larry&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;Region&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" Custom Field Properties "&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;''' cLastFirst&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;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;"Staff full name, last name first"&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; [CLASTFIRST]() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.String&lt;/P&gt;&lt;P&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;Return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CLASTNAME &amp;amp; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;", "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CFIRSTNAME&lt;/P&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;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;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Overrides&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; GetCustomBindablePropertyDescriptors() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.Business.FieldPropertyDescriptor()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Return&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; MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"cLastFirst"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;GetType&lt;/FONT&gt;&lt;FONT size=2&gt;(StaffBO))}&lt;/P&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;Function&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;Region&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]</description><pubDate>Thu, 28 Feb 2008 09:41:51 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item><item><title>RE: Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14607.aspx</link><description>No problem :)</description><pubDate>Thu, 28 Feb 2008 09:41:51 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14605.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;Thanks for the help.&amp;nbsp; That does it nicely.&amp;nbsp; (I'm trying to study VB syntax along with learning SF and I appreciate the clarifications.)&lt;/P&gt;&lt;P&gt;Larry</description><pubDate>Thu, 28 Feb 2008 09:29:48 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item><item><title>RE: Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14601.aspx</link><description>OK...first of all, the framework and VB.NET are not necessarily case sensitive, but the core of .NET is regarding a type descriptor.&amp;nbsp; Anytime that you create a type descriptor, it should always match the name of your custom property...whether you are in a case sensitive language or not, this is ALWAYS the safest thing since there are other core .NET classes that get used within the framework.&lt;/P&gt;&lt;P&gt;[quote]Second, how would I add a second custom property descriptor&amp;nbsp;to my StaffBO?[/quote]&lt;/P&gt;&lt;P&gt;It may be too late, but there is no need to start another thread.&amp;nbsp; But to do this, just add another item to the array:&lt;/P&gt;&lt;P&gt;[codesnippet]Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _&lt;BR&gt;&amp;nbsp;&amp;nbsp; New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor("cLastFirst", GetType(StaffBO)), _&lt;BR&gt;&amp;nbsp;&amp;nbsp; New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor("MySecondProperty", GetType(StaffBO))}[/codesnippet]</description><pubDate>Thu, 28 Feb 2008 09:15:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14600.aspx</link><description>Not to be pushy, but I'm going to start a second thread for this second question "how to a second custom property descriptor".&amp;nbsp;&amp;nbsp; May be more useful for future users and more easily addressed.&lt;/P&gt;&lt;P&gt;Larry</description><pubDate>Thu, 28 Feb 2008 09:05:20 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item><item><title>RE: Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14578.aspx</link><description>Actually, &lt;P&gt;Maybe I do need some help... &amp;lt;s&amp;gt;.&amp;nbsp; I'm obviously new to VB and C# and looking at that cryptic and cap sensitive&amp;nbsp;GetCustomBindablePropertiesDescriptors() override, I'm figuring it is C# and not VB.&amp;nbsp; If this is true, how would the function syntax read in VB?&lt;/P&gt;&lt;P&gt;Second, how would I add a second custom property descriptor&amp;nbsp;to my StaffBO?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Larry</description><pubDate>Wed, 27 Feb 2008 15:22:17 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item><item><title>RE: Error creating custom BO property</title><link>http://forum.strataframe.net/FindPost14576.aspx</link><description>Never mind,&lt;/P&gt;&lt;P&gt;The call is apparently cap sensitive, and changing it to "CLASTFIRST" solved it.&amp;nbsp; Ugh... 2 hours wasted.&amp;nbsp; I thought VB wasn't cap sensitive, but apparently some of the guts of the framework are.&lt;/P&gt;&lt;P&gt;Larry</description><pubDate>Wed, 27 Feb 2008 14:43:05 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item></channel></rss>