IMetabaseObjectDescriptor.ClassId

Syntax

ClassId: Integer;

Description

The ClassId property returns an identifier of the repository object class.

Comments

To check value of this property, use the MetabaseObjectClass enumeration.

Foresight Analytics Platform extensions are based on custom class objects. Classes of these objects are absent in the MetabaseObjectClass enumeration but they can be obtained in the IMetabaseCustomClass.ClassId property. The custom class described by the IMetabaseCustomClass interface can be obtained in the IMetabaseCustomExtender.Classes collection.

One can also use the GetMetabaseHelper.GetCustomClassByEnum(BPClasses.<object type>) function. This function is implemented in the Repository Interaction Unit unit (P10002_METABASE_HELPER) of the Designer of Business Applications extension.

Example

Executing the example requires that the repository contains an object with the OBJ_1111 identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Desc: IMetabaseObjectDescriptor;
    cls: Integer;
Begin
    MB := MetabaseClass.Active;
    Desc := Mb.ItemById("obj_1111");
    cls := Desc.ClassId;
End Sub UserProc;

After executing the example the "cls" variable contains identifier of the class of objects of the metadata database.

See also:

IMetabaseObjectDescriptor