Save method: RecordDefn class

Syntax

Save()

Description

Use this method to validate and save a record definition to the database.

Parameters

None.

Returns

A Boolean value representing the following statuses.

Numeric Value Constant Value Description

0

%MDA_Success

The record definition is saved successfully.

1

%MDA_Failed

The record definition is not saved.

2

%MDA_UseAppDesigner

The record was not created using the PeopleCode RecordDefn class.

4

%MDA_Unsupported

The record type is not a SQL view.

5

%MDA_Duplicate

The specified record definition already exists.

12

%MDA_InvalidDefn

This value is returned when the validation fails. The detailed validation error messages are available through the Messages property.

14

%MDA_NoWriteAccess

The user does not have write permissions to the record.

15

%MDA_SQLNotSaved

The record is saved, but the SQL is not saved.

Example

Local RecordDefn &myRecord = GetRecordDefn("MYRECORD_VW");
If All(&myRecord) Then
   &myRecord.Description = "My new record description";
   &retVal = &myRecord.Save();
   /* do error checking … */
   &retVal = &myNewRecord.Build();
   /* do error checking … */
End-If;