Find/Fetch Notes of an Entity in Dynamic CRM 2011/2013

So many times we might have require to find or to fetch attached Notes of  a particular Entity. We can done this either using Plugin code or Javscript code.
Here I am going to share JavaScript code to perform the same :
Take a look –

function CheckNote()
{
try
{
var entityId = Xrm.Page.data.entity.getId();
alert(entityId);
var serverURL = Xrm.Page.context.getClientUrl()+\”/XRMServices/2011/OrganizationData.svc\”;
alert(serverURL);

if(entityId)
{
var oDataQuery = serverURL+\”/AnnotationSet?$filter=ObjectId/Id eq guid\’\”+entityId+\”\’\”;
alert(oDataQuery);
Xrm.Page.getAttribute(\”spousesname\”).setValue(oDataQuery);
$.ajax({
type: \”GET\”,
contentType: \”application/json; charset=utf-8\”,
datatype: \”json\”,
url: oDataQuery,
beforeSend: function (request) { request.setRequestHeader(\”Accept\”, \”application/json\”); },
success: function (data, textStatus, request)
{
if(data.d.results.length > 0)
{
alert(\”Present\”);
}
else
{
alert(\”Not Present\”);
}
},
error: function (request, status, exception) { }
});

}
}
catch(e)
{
alert(e.message);
}
}

Hope this will help someone to find or retrieve Notes of an entity.

Advertisement

Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

2 thoughts on “Find/Fetch Notes of an Entity in Dynamic CRM 2011/2013

  1. It has been just unfathomably liberal with you to give straightforwardly what precisely numerous people would've promoted for an eBook to wind up making some money for their end, basically given that you could have attempted it in the occasion you needed. Expence Reports

    Like

  2. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: