Skip to Content
0
Former Member
Jul 25, 2014 at 04:50 AM

How to load CFL from XML ?

118 Views

Hi Experts,

I am trying to load CFL from XML file.I am using the following XML and Vb.Net code but it is giving -1106 error while loading.

XML File:

<choosefromlist UniqueID="CFL_4" ObjectType="2" MultiSelection="0" IsSystem="0>"

<conditions>

<condition alias="CardCode" bracket_close_num="0" bracket_open_num="0" compare_fields="0" compared_field_alias="" cond_end_val="" cond_value="C0001" operation="1" relationship="99" use_result="0" />

<condition alias="CardCode" bracket_close_num="0" bracket_open_num="0" compare_fields="0" compared_field_alias="" cond_end_val="" cond_value="ttt" operation="1" relationship="0" use_result="0" />

</conditions>

</choosefromlist>

Load From XML:

Dim oCFL As SAPbouiCOM.ChooseFromList = objForm.ChooseFromLists.Item("CFL_4")

Dim oConds As SAPbouiCOM.Conditions

Dim oCond As SAPbouiCOM.Condition

Dim oEmptyConds As New SAPbouiCOM.Conditions

Dim rsetCFL As SAPbobsCOM.Recordset

rsetCFL = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

oCFL.SetConditions(oEmptyConds)

oConds = oCFL.GetConditions()

oCond = oConds.Add()

oConds.LoadFromXML("CFLList.xml") 'Error -1106 Here

Please suggest

Thanks and Regards

DEV