Skip to Content
Former Member
Nov 29, 2011 at 10:45 AM

Unable to SetValue on system or UDF fields


Hi all,

Using the following code on a Sales Order form, I am able to get the value from field "CardCode", but I am not able to set it's value.

Dim oDBDataSource As SAPbouiCOM.DBDataSource
oDBDataSource = oForm.DataSources.DBDataSources.Item("ORDR")
Dim strCardCodeInit As String = oDBDataSource.GetValue("CardCode", 0)
oDBDataSource.SetValue("CardCode", 0, "C.00001") 

Same thing happens for UDFs.

I get the error "Item - The item is not a user-defined item [66000-8]".

What am I missing here?

Thank you in advance,