Hello,
Can anyone tell me, how can I access Notes text with JavaScript ?
Hello,
Can anyone tell me, how can I access Notes text with JavaScript ?
var url = Xrm.Utility.getGlobalContext().getClientUrl() + ""/api/data/v9.1/annotations("" + NoteID + "")?$select=notetext"";
$.ajax({
type: ""GET"",
contentType: ""application/json; charset=utf-8"",
datatype: ""json"",
url: url,
async: true,
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader(""Accept"", ""application/json"");
XMLHttpRequest.setRequestHeader(""OData-MaxVersion"", ""4.0"");
XMLHttpRequest.setRequestHeader(""OData-Version"", ""4.0"");
XMLHttpRequest.setRequestHeader(""Prefer"", ""odata.include-annotations=*"");
},
success: function (data, textStatus, XmlHttpRequest) {
var noteText = data.notetext;
},
error: function (xmlHttpRequest, textStatus, errorThrown) {
alert(""Something Went Wrong"");
}
});
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156