Skip to Content
0
Oct 28, 2013 at 09:31 AM

New user field in CINF - SAP B1 8.82 PL11

30 Views

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