CreateRecordDefn function

Syntax

CreateRecordDefn()

Description

The CreateRecordDefn function creates an empty record definition with the type set to SQLView, and sets the RuntimeDefn flag for the record definition.

All other properties are blank or not set, similar to Application Designer.

Parameters

None.

Returns

A record definition object.

Returns a null value if the user doesn’t have write permissions for records.

Example

Local RecordDefn &myNewRecord = CreateRecordDefn();
&myNewRecord.Name = "MYRECORD_VW";
&myNewRecord.Description = "My new record";
&myNewRecord.SQL = "SELECT DISTINCT(PROCESS_INSTANCE) FROM PS_MESSAGE_LOG WHERE MESSAGE_NBR = 1018";
Local RecordFieldDefn &recField = &myNewRecord.AddField("MYNEWFIELD");
If All(&recField) Then
   &recField.Key = True;
End-If;