public function getLink()
    {
        $urlSegment = sprintf('%d-%s', $this->ID, URLSegmentFilter::create()->filter($this->getTitle()));
        $result = Controller::join_links(Director::baseURL(), 'dmsdocument/' . $urlSegment);
        if (!$this->canView()) {
            $result = sprintf("javascript:alert('%s')", $this->getPermissionDeniedReason());
        }

        $this->extend('updateGetLink', $result);

        return $result;
    }