API User Tables MD


The UserTablesMD object enables to manage user defined tables as follows:

  • Add a user table.
  • Retrieve a user table from the database by its TableName.
  • Remove a user table.
  • Save the object in XML format.

Source table: OUTB.

IMPORTANT: After creating a new user-defined table in .NET, you must release the object by executing the following line of code, where myObject is a reference to the UserTablesMD object:


Object Model


DI API allows only one metadata object instance (with no other instances of any object type). This maintains data integrity by preventing any manipulation of a business object while modifying the object's properties.

To display the form in the application:

  1. From the main menu bar, select Tools --> Manage User Fields.
  2. Click User Tables.


Adding a UserTable to the Database in a Transaction (Visual Basic)
Dim oUsrTbl As SAPbobsCOM.UserTablesMD Set oUsrTbl = oComp.GetBusinessObject(oUserTables) oComp.StartTransaction oUsrTbl.TableName = "MyTbl1" oUsrTbl.TableDescription = "MyTbl1" RetVal = oUsrTbl.Add If oComp.InTransaction Then oComp.EndTransaction End If


See Also

SAP® B1 DI-API C# definition

public class UserTablesMDClass : IUserTablesMD, UserTablesMD { public virtual BoYesNoEnum Archivable { get; set; } public virtual string ArchiveDateField { get; set; } public virtual DataBrowser Browser { get; } public virtual string TableDescription { get; set; } public virtual string TableName { get; set; } public virtual BoUTBTableType TableType { get; set; } public extern UserTablesMDClass(); public virtual extern int Add(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey( string TableName); public virtual extern int Remove(); public virtual extern void SaveToFile( string FileName); public virtual extern void SaveXML( ref string FileName); public virtual extern int Update(); }

Related information

Bo UTB Table Type BoUTBTableType Enumeration
Specifies the table types for user defined tables.
   Parent: User Tables MD UserTablesMD Object· Table: OUTB

SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates