DataEntryForm.CreateInputForm

Syntax

CreateInputForm(name: String; id: String; parentKey: Integer): IMetabaseObjectDescriptor;

Parameters

name. Name of created data entry form

id. New data entry form identifier

parentKey. Key of the parent object, in which a data entry form is created.

Description

The CreateInputForm method creates a new data entry form and returns its description.

Comments

The method creates an empty data entry form. To work with the data entry form, open the obtained data entry form for edit using the IMetabaseObjectDescriptor.Edit method and cast it to the IDataEntryForm interface.

Example

Executing the example requires that the repository contains a data entry form, for which the specified macro is set as an executable method for a custom button.

Add links to the Dimensions, Metabase, Report system assemblies. Add links to the assemblies required for working with data entry forms.

Public Sub CreateDEF(Report: IPrxReport);
Var
    DEFParent, DEFormDesc: IMetabaseObjectDescriptor;
Begin
    DEFParent := (Report 
As IMetabaseObject).Parent.Parent;
    DEFormDesc := DataEntryForm.CreateInputForm(
"New data entry form""NEW_DEF", DEFParent.Key);
End Sub CreateDEF;

When the macro is executed, a new data entry form is created. The data entry form is saved in the same folder, which contains the current data entry form, which uses the custom button.

See also:

DataEntryForm