Skip to Content
author's profile photo Former Member
Former Member

UserDefinedFieldsMD

Hallo everyone is there a way of retrieving the User defined fields values using the UserDefinedFieldsMD object or is there another way?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 20, 2011 at 09:21 AM

    UserFieldsMD object is for the actual creation and maintainence of the fields themselves.

    e.g. adding a field to the Business Partner table:

    '// Set the Fields' mandatory properties
    
        oUserFieldsMD.TableName = "OCRD" '// BP table
        oUserFieldsMD.Name = "UserField1"
        oUserFieldsMD.Description = "A user field"
        oUserFieldsMD.Type = db_Alpha '// am alphanumeric type
        oUserFieldsMD.EditSize = 20
    
        '// Add the field to the table
        oUserFieldsMD.Add

    To actually enter or retireve values from a UDF, you access them through the object:

    oBusinessPartner.GetByKey("C00001")
    Dim value As String = oBusinessPartner.UserFields.Item("U_UserField1").Value.ToString()

    It works in the same way for other Business Objects.

    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.