WebDrawer - Electronic document 'Not found'

It might be the case that some CM users have permission to view a Record metadata but not the electronic document. In this case they will get a message like the one below when they open a document link.

Improving the message

It may be that you do not wish to inform the user that there is an electronic document to which to do not have access, but if you do here is how to make the message more informative.

  1. in the WebDrawer folder edit the file \RazorPages\NotFound.cshtml

  2. replace the content of the <div> with code similar to that below.

The Code

@if (Model != null && Model.ResponseStatus != null)
{
    if (Model.ResponseStatus.ErrorCode == "101")
    {
<p>The Document cannot be displayed due to access restrictions.  
  To request access to this document please contact the <a href="mailto:rm@acme.com">Records Administrator</a></p>
    }
} else {
    <p>Page not found!</p>
}

The Result

The ‘Not Found’ page should now look similar to this.



Written on May 24, 2019