Skip to Content

User-Defined Fields Window

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 09, 2008 at 10:53 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.