public function getActiveRecord()
    {
        if ($this->recordId == null || $this->recordId == "") {
            return null;
        }
        if ($this->currentRecord == null) {
            // query on $recordId
            $records = $this->directFetch("[Id]='" . $this->recordId . "'", 1);
            if (count($records) == 1) {
                $this->currentRecord = $records[0];
                $this->recordId = $this->currentRecord["Id"];
            } else {
                $this->currentRecord = null;
            }
        }

        return $this->currentRecord;
    }