cancel
Showing results for 
Search instead for 
Did you mean: 

UDF for documet addresses

anrodse
Participant
0 Kudos

Is it possible to create a User Defined Field at Document addresses lines (RDR12 table) via the menu option 'Manage User Fields' or using DiApi?

I cannot find a way to do that.

maik_delly
Active Contributor

Hi Antonia,

it is possible using DI API :

SAPbobsCOM.UserFieldsMD oUserFields = (SAPbobsCOM.UserFieldsMD)SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields);
oUserFields.Name = "TEST";
oUserFields.Description = "TEST UDF";
oUserFields.TableName = "RDR12";
oUserFields.Type = SAPbobsCOM.BoFieldTypes.db_Alpha;
oUserFields.SubType = SAPbobsCOM.BoFldSubTypes.st_None;
oUserFields.EditSize = 10;
if (oUserFields.Add() != 0)
    MessageBox.Show("Error while adding UDF: " + SBO_Company.GetLastErrorDescription());
else
    MessageBox.Show("UDF created");

best regards,

Maik

anrodse
Participant
0 Kudos

Hi Maik,

I've tried your solution and it works. The UDF is created for any document but I cannot see it using SAP Client. The UDF is hidden and I cannot edit.

Is it possible to make it visible somehow? I'm using SBO 9.2.

BTW: post your solutions as answer (not as comment) so people can upvote/accept it.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

maik_delly
Active Contributor

Hi Antonio,

I don't think there is a way to show the UDF on formtype 13000000. Even using UI API would be not an option, since it is a subform of the mdoc form. Only way to be able add data would be an UI API form with DI API update of address line...

best regards,

Maik

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor

Hi,

it is not possible to create new UDF for RDR12 using User-Defined-Management tool.

Regards,

Nagarajan

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi anrodse,

Even though DI API allows to create UDF on all tables, it is not recommended to create UDF on tables which are not exposed in UDF management.

It is not possible to operate on these UDF with DIAPI, B1Studio or UI API. This is a limitation.

Refer to SAP Note 2281349 for the same.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support