Shortcut Considerations

An expression of the form


RECORD.recname.method(.  .  .)

is converted to an object expression by using GetRecord(RECORD.recname). For example, the following two lines of code are equivalent:

&MyRow = GetRecord(RECORD.EMPL_CHKLST_ITEM).ParentRow;

In addition, the default method for the Record class is the GetField method. This means you can access a field by just specifying the field name, instead of using GetField. For example, the following two lines of code, which both disable the EMPLID field, are equivalent:

&MyRec.EMPLID.Enabled = False;
&MyRec.GetField(FIELD.EMPLID).Enabled = False;

Note: If the field you’re accessing has the same name as a record property (such as, Name) you can’t use this method for accessing the field. You must use the GetField method.