biuan SAP® BUSINESS ONE SDK
API User Objects MD

Description

The UserObjectsMD object represents the registration data settings, such as table name and supported services, of a user defined object.

This object enables you to:

  • Add a user define object.
  • Retrieve a user define object by its key.
  • Update a user define object .
  • Remove a user define object from the database.
  • Save the object in XML format.
  • Specify the menu location of the UDO.

Source table: OUDO.


IMPORTANT: After creating a new UDO in .NET, you must release the object by executing the following line of code, where myObject is a reference to the UserObjectsMD object:

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

Object Model

Remarks

Mandatory fields in SAP Business One: Code and TableName.

To activate the registration wizard in the application:

  • Select Tools > User Defined Object > User Defined Object Registration.

For more information, see the User Defined Object documentation.

Example

Specifying the Menu Location of the UDO (C#)
// Updating a UDO to have a Menu item. UserObjectsMD udo = cmp.GetBusinessObject(BoObjectTypes.oUserObjectsMD) as UserObjectsMD; // Get UDO udo.GetByKey("MyUDO"); // Set UDO to have a menu udo.MenuItem = BoYesNoEnum.tYES; udo.MenuCaption = "My UDO menu"; // Set father and position of menu item. udo.FatherMenuID = 43535; // Business Partners menu UID udo.Position = 1; // Set UDO menu UID udo.MenuUID = "mn_MyUDO"; // Update UDO to have the new menu item udo.Update();

See Also

SAP® B1 DI-API C# definition

public class UserObjectsMDClass : IUserObjectsMD, UserObjectsMD { public virtual DataBrowser Browser { get; } public virtual BoYesNoEnum CanApprove { get; set; } public virtual BoYesNoEnum CanArchive { get; set; } public virtual BoYesNoEnum CanCancel { get; set; } public virtual BoYesNoEnum CanClose { get; set; } public virtual BoYesNoEnum CanCreateDefaultForm { get; set; } public virtual BoYesNoEnum CanDelete { get; set; } public virtual BoYesNoEnum CanFind { get; set; } public virtual BoYesNoEnum CanLog { get; set; } public virtual BoYesNoEnum CanYearTransfer { get; set; } public virtual UserObjectMD_ChildTables ChildTables { get; } public virtual string Code { get; set; } public virtual BoYesNoEnum EnableEnhancedForm { get; set; } public virtual UserObjectMD_EnhancedFormColumns EnhancedFormColumns { get; } public virtual string ExtensionName { get; set; } public virtual int FatherMenuID { get; set; } public virtual UserObjectMD_FindColumns FindColumns { get; } public virtual UserObjectMD_FormColumns FormColumns { get; } public virtual string FormSRF { get; set; } public virtual string LogTableName { get; set; } public virtual BoYesNoEnum ManageSeries { get; set; } public virtual string MenuCaption { get; set; } public virtual BoYesNoEnum MenuItem { get; set; } public virtual string MenuUID { get; set; } public virtual string Name { get; set; } public virtual BoUDOObjType ObjectType { get; set; } public virtual BoYesNoEnum OverwriteDllfile { get; set; } public virtual int Position { get; set; } public virtual BoYesNoEnum RebuildEnhancedForm { get; set; } public virtual string TableName { get; set; } public virtual string TemplateID { get; set; } public virtual BoYesNoEnum UseUniqueFormType { get; set; } public extern UserObjectsMDClass(); public virtual extern int Add(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey( string Code); public virtual extern int Remove(); public virtual extern void SaveXML( ref string FileName); public virtual extern int Update(); }

Related information


User Object MD Child Tables UserObjectMD_ChildTables Object· Table: UDO1
UserObjectMD_ChildTables is child object of the UserObjectsMD object that represents child user tables and their related history log tables. Source table: UDO1.
   Parent: User Objects MD UserObjectsMD Object· Table: OUDO

User Object MD Enhanced Form Columns UserObjectMD_EnhancedFormColumns Object· Table: UDO4
UserObjectMD_EnhancedFormColumns is a child object of the UserObjectsMD object that represents the default fields (columns) to display in the UDO enhanced default form (UDO form with the header-line style). Source table: UDO4.
   Parent: User Objects MD UserObjectsMD Object· Table: OUDO

User Object MD Find Columns UserObjectMD_FindColumns Object· Table: UDO2
UserObjectMD_FindColumns is a child object of the UserObjectsMD object that represents the fields (columns) to display in the Find Form (Choose From List form). Source table: UDO2.
   Parent: User Objects MD UserObjectsMD Object· Table: OUDO

User Object MD Form Columns UserObjectMD_FormColumns Object· Table: UDO3
UserObjectMD_FormColumns is child object of the UserObjectsMD object that represents the default fields (columns) to display in the default form (UDO form with the matrix style). Source table: UDO3.
   Parent: User Objects MD UserObjectsMD Object· Table: OUDO

Bo UDO Obj Type BoUDOObjType Enumeration
Specifies the object types for user defined objects.
   Parent: User Objects MD UserObjectsMD Object· Table: OUDO


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