cancel
Showing results for 
Search instead for 
Did you mean: 

New user field in CINF - SAP B1 8.82 PL11

former_member458725
Active Participant
0 Kudos

Hi,

     I want to create a new filed in CINF, code below

            SAPbobsCOM.UserFieldsMD oUserFieldsMD = null;

            oUserFieldsMD = ((SAPbobsCOM.UserFieldsMD)(Global.SapCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)));

            int lRetCode = 0;

            oUserFieldsMD.TableName = Table;

            oUserFieldsMD.Name = Title;

            oUserFieldsMD.Description = Description;

            oUserFieldsMD.Type = Type;

            if (Type != SAPbobsCOM.BoFieldTypes.db_Numeric)

                oUserFieldsMD.SubType = Structure;

            oUserFieldsMD.EditSize = Size;

            if (LinkTable != "")

                oUserFieldsMD.LinkedTable = LinkTable;

            lRetCode = oUserFieldsMD.Add();

            string err = Global.SapCompany.GetLastErrorDescription();

            System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldsMD);

But in SAP B1 8.82 PL 11 and above, this filed is not created. I have noticed that, This filed is add to " CUFD " table. Is there any solution to add a new field in CINF [ 8.82 PL11 and above ].

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

edy_simon
Active Contributor
0 Kudos

Hi Vibin,

I'd rather ask a question instead,

Why would you create a udf in cinf table?

This table only holds 1 record. And it is used internally by SBO.

If you need to store your user fields, you can create your own table.

Regards,

Efy

former_member458725
Active Participant
0 Kudos

Ya...True, But I need to save a password (not SAP) here, which i have to use later for log-in. It is a one time process. I was using this in so may places in my Add-on. So it will be difficult to change the table now. So... I have to use it.

former_member458725
Active Participant
0 Kudos

Please reply experts...