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

Retrieve Multiple Annotations / Attachments SDK.Rest

$
0
0

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?


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>