Showing results for 
Search instead for 
Did you mean: 

How Get & Set Value to User defined field

Former Member
0 Kudos

I use JE form and make one user-defined-field type EditText

I want to set value to the user-defined-field for when Adding JE this value i set will save to OJDT too

How i get user-defined-field Object and set value ?

Thank for suggestion

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank for answer But UDF i make i don't want to user key in.

i must use DI & UI programing to set value to UDF when form JE load.

now i cannot get UniqueID of UDF for reference to this object for set value.

Former Member
0 Kudos

Hi,this sample code may be help you to solve your problem

Dim oAR As SAPbobsCOM.Documents

oAR = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)

'You could get item by uniqe id first

If oAR.GetByKey("KEY") Then

'You must specific field that you want to use

'Insert Value

oAR.UserFields.Fields.Item("UserFieldName").Value = Value

'retrive value use this code

Value = oAR.UserFields.Fields.Item("UserFieldName").Value

Dim ret As Integer

ret = oAR.Update()

If ret <> 0 Then

Dim str As String

oCompany.GetLastError(ret, str)


End If

End If

Former Member
0 Kudos

if you don't know UniqueID of UDF for reference

that two way you can get UniqueID of UDF for reference

1. enable view >> system information on UI and see information in statusbar

2. menu Tool >> User-defined fields >> Manage and find it in category with your target 'JE'. I think that connent in Accounting category

Active Contributor
0 Kudos


If I've understood your question correctly, you want to be able to load and save data in a new UDF...

If you've added a UDF to the Journal Entry header then SBO will automatically make this field available on the Journal Entry screen (or more precisely, on the UDF side window of the Journal Entry screen) and will automatically save any value you enter in this field. To see and edit the field you can open the Journal Entry screen then choose View--Show User-Defined Fields from the top menu.

If I've misunderstood your question then please post a clarification on what you are trying to do.

Kind Regards,