code: public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
      { // Read a valid record
          if (iChangeType == DBConstants.DELETE_TYPE)
              if ((this.getOwner().getEditMode() & DBConstants.EDIT_ADD) != DBConstants.EDIT_ADD)
                  if (this.isSoftDeleteThisRecord())
          {
              int iErrorCode = this.softDeleteThisRecord();
              
              if (iErrorCode != DBConstants.NORMAL_RETURN)
                  return iErrorCode;
              
              try {
                  this.getOwner().set();      // Update the record
              } catch (DBException ex) {
                  return ex.getErrorCode();
              }
              
              return iErrorCode;
          }
          return super.doRecordChange(field, iChangeType, bDisplayOption);   // Initialize the record
      }
docs: Called when a change is the record status is about to happen/has happened.
  On an add or lock, makes sure the main key field is set to the current main target field
  so it will be a child of the current main record.
  @param field If this file change is due to a field, this is the field.
  @param iChangeType The type of change that occurred.
  @param bDisplayOption If true, display any changes.
  @return an error code.
  Before an add, set the key back to the original value.