odata - Need to fetch Annotation (Notes) for each list in dynamics CRM 2011 -
i trying fetch annotation entity (note) associated every list entity based on list id. want top 1 record when sorted in descending order of created on date. have written below restfull call using odata query in button click event of javascript.
function button1_onclick() { var filtercriteria = "$select=notetext&$top=1&$orderby=createdon&$expand=list_annotation&$filter=list_annotation/listid eq '" + document.getelementbyid("text1").value + "'"; sdk.jquery.retrievemultiplerecords( "annotation", filtercriteria, function (results) { if (results != null) { alert("success."); } else { alert("no notes available."); } }, errorhandler, function () { //oncomplete handler } );
Comments
Post a Comment