Skip to Content
0
Former Member
Feb 07, 2008 at 08:32 AM

.srf Form ItemUID is invalid from B1DE

95 Views

Hi Guys,

I've created a .srf form from Screen Painter and I am using the B1DE to develop a solution. There is no UDF or UDT or UDO in the system and the form is not linked to any of the DataSources...So it is displaying well.

I am trying a simple getText method on an EditText but an error appears....

*****

EXCEPTION: Form__EBS_FRM_CRDCLM.OnFormLoad raised

Item - Invalid item [66000-3]. Form Unique Id: 'EBS_FRM_CRDCLM0',

Item Unique Id: '4'

*****

This is my Code.....

*****

<B1Listener(BoEventTypes.et_FORM_LOAD, False)> _

Public Overridable Function OnFormLoad(ByVal pVal As ItemEvent) As Boolean

Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)

'ADD YOUR ACTION CODE HERE ...

Dim itmCardCode As SAPbouiCOM.Item

Dim edtCardCode As SAPbouiCOM.EditText

itmCardCode = form.Items.Item("4")

edtCardCode = itmCardCode.Specific

Try

Dim oCFLs As SAPbouiCOM.ChooseFromListCollection

Dim oCFL As SAPbouiCOM.ChooseFromList

Dim oCons As SAPbouiCOM.Conditions

Dim oCon As SAPbouiCOM.Condition

Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams

oCFLs = form.ChooseFromLists

oCFLCreationParams = B1Connections.theAppl.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)

' Adding 2 CFL, one for the button and one for the edit text.

oCFLCreationParams.MultiSelection = False

oCFLCreationParams.ObjectType = "2"

oCFLCreationParams.UniqueID = "CFL1"

oCFL = oCFLs.Add(oCFLCreationParams)

' Adding Conditions to CFL1

oCons = oCFL.GetConditions()

oCon = oCons.Add()

oCon.Alias = "CardType"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

oCon.CondVal = "S"

oCFL.SetConditions(oCons)

oCFLCreationParams.UniqueID = "CFL2"

oCFL = oCFLs.Add(oCFLCreationParams)

Catch

MsgBox(Err.Description)

End Try

edtCardCode.ChooseFromListUID = "CFL1"

edtCardCode.ChooseFromListAlias = "CardCode"

Return True

End Function

*****

Can any1 help explain what the problem could be?

Thanks