Hi Luiz,
Look again in the SF help on how to create a Custom Field Property, somewhere you have it wrong.
Here is a sample of several CFPs I have in one of my BO:
Protected Overrides Function GetCustomBindablePropertyDescriptors() As FieldPropertyDescriptor()
' Create and return a new array of FieldPropertyDescriptor objects that contains
' the ReflectionPropertyDescriptor for the Custom Fields.
Return New FieldPropertyDescriptor() _
{New ReflectionPropertyDescriptor("cfp_CardName", GetType(bizTransactionItems)), _
New ReflectionPropertyDescriptor("cfp_CardLotNumberWithPrefix", GetType(bizTransactionItems)), _
New ReflectionPropertyDescriptor("cfp_CardEndSerialNumber", GetType(bizTransactionItems)), _
New ReflectionPropertyDescriptor("cfp_CardDescription_ForListView", GetType(bizTransactionItems)), _
New ReflectionPropertyDescriptor("cfp_CardEndSerialNumber_ForListView", GetType(bizTransactionItems)), _
New ReflectionPropertyDescriptor("cfp_CardLotNumberWithPrefix_ForListView", GetType(bizTransactionItems))}
End Function
'''
''' Combines the CardLotNoPrefix with the CardLotNumber.
'''
'''
''' The Lot Number formatted with a prefix if not empty.
'''
BusinessFieldDisplayInEditor(), _
Description("Combines the CardLotNoPrefix with the CardLotNumber."), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Overridable ReadOnly Property [cfp_CardLotNumberWithPrefix_ForListView]() As String
Get
If _CardBOLookup.Count = 0 Then
_CardBOLookup.FillByActiveRecordsAndITemType(BusinessEditingState.Idle, bizItems.bizItemsFieldNames.ItemIsInactive.ToString, Enumerations.ItemType.CallingCard)
End If
If _CardBOLookup.Count > 0 AndAlso _CardBOLookup.SeekToPrimaryKey(Me.FK_Items) Then
If Not String.IsNullOrEmpty(_CardBOLookup.CardLotNoPrefix) Then
Return String.Format("{0}-{1}", _CardBOLookup.CardLotNoPrefix, Me.CardLotNo.Trim)
Else
Return Me.CardLotNo
End If
Else
Return Me.CardLotNo
End If
End Get
End Property
BusinessFieldDisplayInEditor(), _
Description("Card Lot Number with any Prefix if exist."), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Overridable ReadOnly Property [cfp_CardLotNumberWithPrefix]() As String
Get
Return CType(Me.CurrentRow.Item("cfp_CardLotNumberWithPrefix"), System.String)
End Get
End Property
In the CFP definition you can have any code you want to return the proper value, or like in the case of "cfp_CardLotNumberWithPrefix" here you can simply return the column from the CurrentRow which is what I do when using a SELECT statement with a JOIN table to return the FK field description I need, so in reality you DO NOT NEED A VIEW, you can use a stored procedure to get the data for any BO and have any JOIN condition in your SP and then use a CFP like "cfp_CardLotNumberWithPrefix" and when the BO is filled, its data table will have that column "cfp_CardLotNumberWithPrefix" available which the CFP will read.
I know this could be confusing at first, but at the end is very simple and it works.
Edhy Rijo