cancel
Showing results for 
Search instead for 
Did you mean: 

How to add udf in table OMRC ( manufacturers)

Former Member
0 Kudos

Hi all,

Does any one know how to add UDF in table OMRC ( manufacturers) ?

Thanks in advance

Regards

Jia Shun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jia,

Refer This....

Link: [url]

Thanks

Shafi

Former Member
0 Kudos

Hi Shafi, thanks for your reference.

After i read this thread, it seems that it can not add an udf in table OMRC.

is it really no way to add an udf in this table ?

Thanks in advance

Regards

Jia shun

Former Member
0 Kudos

That thread is misleading, you can add fields to tables that are not exposed to the User Defined Fields Managment screen, but only by using SDK.

Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD

    '// The meta-data object needs to be initialized with a
    '// regular UserFields object
    Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)

    '// Set the Fields mandatory properties

    oUserFieldsMD.TableName = "OMRC"
    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

That's taken from the UserFieldsMD Object section of the SDK help. I do not see a reason that this will not work.

Former Member
0 Kudos

Hi, njmog1

Thanks for your response. I have try this and it's work. By the way how can i remove the UDF using SDK ?

Thanks in advance

Regards

Jia shun

Former Member
0 Kudos

You can just call the oUserFieldsMD.Remove method.

It depends on your version of B1 though, perhaps in an earlier version, this method was not yet exposed & in that case I do not think you can remove it. I know in 8.8 PL10 it is available.

If your issue is solved, please mark the answer in the thread so others may use it in the future.

Answers (0)