IRdsDictionary.EditElementCallbackFore

Syntax

EditElementCallbackFore: String;

EditElementCallbackFore: string;

Description

The EditElementCallbackFore property sets a method to replace standard view of the Dictionary Element Properties dialog box with the custom one in the desktop application.

Comments

The method must be specified as follows:

When the property is set, the specified method and its signature are checked.

To delete the specified method, set the property to Null.

Example

Executing the example requires that the repository contains a table MDM dictionary with the RDS identifier, a unit with the MODULE identifier to replace view of the dialog box, the AddOrEditElement JS function, and a custom dialog box view form. The example of unit and form is specified in the How to Create a Custom View of the Dictionary Element Properties Dialog Box article.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Obj: IMetabaseObject;
    Dict: IRdsDictionary;
Begin
    
// Get current repository
    MB := MetabaseClass.Active;
    
// Get table MDM dictionary
    Obj := MB.ItemById("RDS").Edit;
    Dict := Obj 
As IRdsDictionary;
    
//Set unit to replace standard element card
    Dict.EditElementCallbackFore := "MODULE.AddOrEditElement";
    
//Set JS function to replace standard element card
    Dict.EditElementCallbackJS := "AddOrEditElement";
    
// Save dictionary
    Obj.Save;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Obj: IMetabaseObject;
    Dict: IRdsDictionary;
Begin
    
// Get current repository
    MB := Params.Metabase;
    
// Get table MDM dictionary
    Obj := MB.ItemById["RDS"].Edit();
    Dict := Obj 
As IRdsDictionary;
    
//Set unit to replace standard element card
    Dict.EditElementCallbackFore := "MODULE.CARD_Form.AddOrEditElement";
    
//Set JS function to replace standard element card
    Dict.EditElementCallbackJS := "AddOrEditElement";
    
// Save dictionary
    Obj.Save();
End Sub;

After executing the example, JS function, unit, and function are set in the table MDM dictionary on the Card tab.

See also:

IRdsDictionary