code: public KeyField getKeyField(int iKeyFieldSeq, boolean bForceUniqueKey)
      {
          KeyField keyField = null;
          if (iKeyFieldSeq != this.getKeyFields(false, true))
              keyField = this.getKeyField(iKeyFieldSeq);
          else
              keyField = this.getRecord().getKeyArea(0).getKeyField(0);  // Special - key must be unique
          return keyField;
      }
docs: Get this key field taking into account whether the key must be unique.
  Add one key field (the counter field if this isn't a unique key area and you want to force a unique key).
  @param bForceUniqueKey If params must be unique, if they aren't, add the unique key to the end.
  @return The Key field.