code: public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
      {
          if ((iChangeType == DBConstants.AFTER_UPDATE_TYPE)
              || (iChangeType == DBConstants.AFTER_ADD_TYPE)
              || (iChangeType == DBConstants.AFTER_DELETE_TYPE))
          {
              int iGroupID = (int)this.getOwner().getField(UserPermission.USER_GROUP_ID).getValue();
              if (m_iOldGroupID != -1)
                  if (iGroupID != m_iOldGroupID)
                      this.updateGroupPermission(m_iOldGroupID);
              this.updateGroupPermission(iGroupID);
          }
          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.