RenameRecord function

Syntax

RenameRecord(Record.NewRecordName, Record.OldRecordName)

Description

Use the RenameRecord function to modify a record definition to have a name. This function also cleans up most references so they now use the new name.

Note:

Because using this function changes records that are used to build application tables, you must rebuild (alter) the specified project before these changes can be used.

Parameters

Parameter Description

NewRecordName

Specify the new record name to be used. This name must be prefixed by the reserved word Record.

OldRecordName

Specify the name of the record to be changed. This name must be prefixed by the reserved word Record.

Returns

A constant value. The values are:

Value Description

%MDA_Success

Bulk operation completed successfully.

%MDA_Failure

Bulk operation did not complete successfully.

%MDA_RecordNotFound

The record specified with OldRecordName wasn't found.

Example

&ret = RenameRecord(RECORD.OrgIdTbl, RECORD.DeptIdTbl);  
If (&ret = %MDA_Success) Then 
   MessageBox(0, "Metadata Fn Status", 0, 0, "RenameRecord succeeded"); 
Else 
   MessageBox(0, "Metadata Fn Status", 0, 0, "RenameRecord failed"); 
End-If;

Considerations Using this Function

This function is intended for use during configuration time only, before active runtime usage is initiated. Using this function during active runtime is not supported. Changes to data definitions are not recognized on currently loaded component. In general, changes aren't recognized until the component is reloaded.

This operation is time consuming.

WARNING:

These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions, even if the page is subsequently cancelled.