Skip to main content

Notifications

Dynamics 365 general forum
Suggested answer

Not able to fetch Annotation(Note) associated to record.

Posted on by 595

Hi,

I have a requirement saying that I have to show some ribbon button if the particular record contains not attached for this, I have done enable rule using javascript

Please help me to achieve this...

For your reference, I have attached code below

async function ExtractHeader(primaryControl) {
'use strict';

let formContext = primaryControl;

var id=formContext.data.entity.getId();
Console.log("before submit value");
let Extracted = formContext.getAttribute("sysia_extracted").getValue();
let issubmit = formContext.getAttribute("sysia_submit").getValue();
Console.log("after submit value");
let options = "?$select=annotationid&$filter=_objectid_value eq "${id}";
let result=await Xrm.WebApi.retrieveRecord("annotation",options);

if (result!=null&&Extracted == false && issubmit == false)
return true;
else
return false;

}

  • Suggested answer
    RE: Not able to fetch Annotation(Note) associated to record.

    Hi,

    Please check the JS Function on community.dynamics.com/.../retrieving-annotation-from-quote-form-with-javascript-api-call-keeps-returning-http400-error

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans