src/Service/queryService.php
public function fetchRecord($doName, $searchRule)
    {
        $do = Openbizx::getObject($doName);
        if (!$do) {
            throw new Exception("System cannot get object of $doName.");
            return;
        }
        $r = $do->directFetch($searchRule, 1);
        if (count($r) > 0)
            return $r[0];
        return null;
    }
public function fetchRecord($doName, $searchRule)
    {
        $do = Openbizx::getObject($doName);
        if (!$do) {
            throw new Exception("System cannot get object of $doName.");
            return;
        }
        $r = $do->directFetch($searchRule, 1);
        if (count($r) > 0)
            return $r[0];
        return null;
    }
Fetch record

@param string $doName data object name
@param string $searchRule rule of search
@return mixed