Bug report for version 1.0.0013 in EditCase.aspx: if a knowledge base article is attached to a case/incident in CRM, the EditCase.aspx page throws an error: Object reference not set to an instance of an object, line 93. Also, Case.KBArticleId does not resolve
to a string, and the default path on the sample website is /knowledge-base/ not /kb/ ...
This is what I used instead (starting at line 78):
XrmContext.Attach(Case);
if (Case.subject_incidents != null)
{
SubjectLabel.Text = "| Subject: " + Case.subject_incidents.Title;
}
if (Case.KbArticleId != null)
{
KB.Text = "<p>Please see the following KB article: <a target=\"_blank\" href=\"/knowledge-base/article?id=" +
Case.kbarticle_incidents.Id + "\">" +
Case.kbarticle_incidents.Title + "</a></p>";
}
XrmContext.Detach(Case);