docs: public int lockCurrentRecord() throws DBException
      {
          int iErrorCode = DBConstants.NORMAL_RETURN;
          Record record = this.getRecord();
          Object bookmark = record.getHandle(DBConstants.BOOKMARK_HANDLE);
          if (bookmark != null)
          {   // Always
              String strUserName = null;
              BaseApplication app = null;
              org.jbundle.model.Task task = null;
              if (record.getRecordOwner() != null)
                  task = record.getRecordOwner().getTask();
              if (task != null)
                  app = (BaseApplication)record.getRecordOwner().getTask().getApplication();
              if (app != null)
                  strUserName = app.getProperty(DBParams.USER_NAME);
              Environment env = null;
              if (app != null)
                  env = app.getEnvironment();
              else
                  env = Environment.getEnvironment(null);
              iErrorCode = env.getLockManager().lockThisRecord(task, record.getDatabaseName(), record.getTableNames(false), bookmark, strUserName, record.getOpenMode());
          }
          return iErrorCode;
      }