code: public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
      {
          if (iChangeType == DBConstants.AFTER_ADD_TYPE)
          {
              UserInfo userTemplate = this.getUserTemplate();
              if (userTemplate != null)
              {
                  Record userInfo = this.getOwner();
                  Object bookmark = userInfo.getLastModified(DBConstants.BOOKMARK_HANDLE);
                  RecordOwner recordOwner = this.getOwner().findRecordOwner();
                  UserRegistration userRegistration = new UserRegistration(recordOwner);
                  UserRegistration newUserRegistration = new UserRegistration(recordOwner);
                  userRegistration.addListener(new SubFileFilter(userTemplate));
                  try {
                      while (userRegistration.hasNext())
                      {
                          userRegistration.next();
                          newUserRegistration.addNew();
                          newUserRegistration.moveFields(userRegistration, null, bDisplayOption, DBConstants.INIT_MOVE, true, false, false, false);
                          newUserRegistration.getField(UserRegistration.ID).initField(bDisplayOption);
                          newUserRegistration.getField(UserRegistration.USER_ID).setData(bookmark);
                          newUserRegistration.add();
                      }
                  } catch (DBException e) {
                      e.printStackTrace();
                  }
              }
          }
          return super.doRecordChange(field, iChangeType, bDisplayOption);
      }
docs: Called when a change is the record status is about to happen/has happened.
  @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.
  ADD_TYPE - Before a write.
  UPDATE_TYPE - Before an update.
  DELETE_TYPE - Before a delete.
  AFTER_UPDATE_TYPE - After a write or update.
  LOCK_TYPE - Before a lock.
  SELECT_TYPE - After a select.
  DESELECT_TYPE - After a deselect.
  MOVE_NEXT_TYPE - After a move.
  AFTER_REQUERY_TYPE - Record opened.
  SELECT_EOF_TYPE - EOF Hit.