docs: public boolean onAdd()
      {
          Record record = this.getMainRecord();
          if (record == null)
              return false;
  
          try {
              if (record.isModified(false))
              {
                  if (record.getEditMode() == Constants.EDIT_IN_PROGRESS)
                      record.set();
                  else if (record.getEditMode() == Constants.EDIT_ADD)
                      record.add();
              }
              record.addNew();
              this.clearStatusText();
          } catch(DBException ex) {
              this.displayError(ex);
              return false;
          }
          return true;
      }