Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Web API response - content of knowledge base article

$
0
0

Hello,

I am trying to get the knowledge base article's content, but the WEB api doesn't return the content in html format with tags, any help please?

I am using CRM Rest builder of  

var req = new XMLHttpRequest();
req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v8.2/knowledgearticles(MyGuid)?$select=content", true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
req.onreadystatechange = function() {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var result = JSON.parse(this.response);
var content = result["content"];
} else {
Xrm.Utility.alertDialog(this.statusText);
}
}
};
req.send();


Thank you


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images