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;
}
Hi,
Please check the JS Function on community.dynamics.com/.../retrieving-annotation-from-quote-form-with-javascript-api-call-keeps-returning-http400-error
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,493 Most Valuable Professional
nmaenpaa 101,148