biuan SAP® BUSINESS ONE SDK
API User Keys MD

Description

The UserKeysMD object enables to mange user defined keys of user tables. A user table contains a default primary key that consists of the Code and Name columns. Use the UserKeysMD object to add secondary keys to user tables.

This object enables you to:

  • Add a user key (identifier) to a user table.
  • Retrieve the values of the object's properties by its KeyIndex and TableName.
  • Remove a user key.
  • Save the object in XML format.

Source table: OUKD.

Object Model

Remarks

DI API allows only one meta data 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.

Furthermore, it is recommended to add user keys while the user table is still empty.

To display the form in the application:

  1. From the main menu bar, select Tools --> Manage User Fields.
  2. Select a User Table.
  3. Click Keys.

Example

See Also

SAP® B1 DI-API C# definition

public class UserKeysMDClass : IUserKeysMD, UserKeysMD { public virtual DataBrowser Browser { get; } public virtual UserKeysMD_Elements Elements { get; } public virtual int KeyIndex { get; } public virtual string KeyName { get; set; } public virtual string TableName { get; set; } public virtual BoYesNoEnum Unique { get; set; } public extern UserKeysMDClass(); public virtual extern int Add(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey( string TableName, int KeyIndex); public virtual extern int Remove(); public virtual extern void SaveToFile( string FileName); public virtual extern void SaveXML( ref string FileName); }

Related information


User Keys MD Elements UserKeysMD_Elements Object· Table: UKD1
UserKeysMD_Elements is a child object of the UserKeysMD object. UserKeysMD_Elements defines the fields that combine the key index. Source table: UKD1.
   Parent: User Keys MD UserKeysMD Object· Table: OUKD


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