cancel
Showing results for 
Search instead for 
Did you mean: 

User-Defined Fields Window

former_member682029
Contributor
0 Kudos

Hi All,

I have one issue with the User-Defined Fields window of the ACTIVITY form.

I had added some user defined fields (UDF) to the Activities so that the User-Defined Fields are displaying in a separate window just near to the Activity window with Type (-651). All the UDFs are bound to the table, "OCLG".

I want to initialize the values in the User defined fields controls with a text when the form is loading.

I had tried to do this using

oForm.Datasources.DBDatasources.Item("OCLG").SetValue("U_CUST",0,"MyValue");When I executed this statement, i am getting HResult error.

Then I tried this by using UserDataSources.

The same error repeats.

But the code with .Specific.String = NewVal is working fine.

Can you please explain the scenarios that we are able to do it using .Specifc.String. Is this a true method for doing this?

if not

please tell me How can we do this using Datasources (DBDatasources/ UserDataSources),?

Please Help.

Thank you in Advance

Anoop

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Anoop,

when you have created UDF in master item data, the textbox you can see on left side of form (separate form) is bounded already to this field. You cannot rebound it (its system form).

When you want to change the value, you must use specific.string or specific.value for that textbox (as you wrote), but the calcualted value will be stored into master table (change of udf will set formmode to update mode). If you dont need to update formmode, set the formmode by code to normal mode.

hope it helps

Petr