I would like to retrieve last 10 attachments from "Annotation" entity when the page loads.
Here is my code in onload event:
function DisplayAttachments()
{
SDK.REST.retrieveMultipleRecords(
"Annotation",
"?$select=CreatedBy,CreatedOn,DocumentBody,FileName&$filter=ObjectTypeCode eq 'ent_myfiles' and CreatedOn ge datetime'2016-09-29T04:00:00.000Z'&$top=10&$orderby=CreatedOn desc",
function (results) {
for (var i = 0; i < results.length; i++) {
var createdBy = results[i].CreatedBy;
var createdOn = results[i].CreatedOn;
var documentBody = results[i].DocumentBody;
var fileName = results[i].FileName;
}
},
function (error) {
alert(error.message);
},
function () {
//On Complete - Do Something
}
);
}
How do I get the returned attachments to show up in the Notes section?