SaveAsView method: RecordDefn class
Syntax
SaveAsView(record_name)
Description
This method sets the RuntimeDefn flag, changes the record type to View, validates, and saves the record definition to the database.
Parameters
| Parameter | Description |
|---|---|
|
record_name |
Specifies the new record, which is saved as a view. |
Returns
A Boolean value representing the following statuses.
| Numeric Value | Constant Value | Description |
|---|---|---|
|
0 |
%MDA_Success |
The record definition is successfully saved as a view. |
|
1 |
%MDA_Failed |
The record definition is not saved as a view. |
|
5 |
%MDA_Duplicate |
The specified record already exists. |
|
12 |
%MDA_InvalidDefn |
This value is returned when the validation fails. The detailed validation error messages are available through the Messages property. |
|
15 |
%MDA_SQLNotSaved |
The record is saved, but the SQL is not saved. |
Example
&retVal = &srcRecord.SaveAsView("RT_VIEW");