Hi,
I am trying to retrieve the list of activities associated with a contact, and then display a warning message if any of the activities are open and assigned to a current logged-in user. But i am getting an error . its showing problem with URL but it was working last week and suddenly its not. Any help will be greatful
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR)GET - https://******.crm.dynamics.com/_static/_common/scripts/es6-shim.map
Here is my java script code
function checkActiveTasksAssignedToMe()
{
var uniqueNotificationId = "OutstandingTasks";
Xrm.Page.ui.clearFormNotification(uniqueNotificationId);
var contactId = Xrm.Page.data.entity.getId().replace(/[{}]/g,"");
var currentUserId = Xrm.Page.context.getUserId().replace(/[{}]/g,"");
var req = new XMLHttpRequest();
var requestUrl = Xrm.Page.context.getClientUrl() + "/api/data/v8.2/tasks?$filter=_regardingobjectid_value eq " + contactId + " and _ownerid_value eq " + currentUserId + " and statecode eq 0";
req.open("GET", requestUrl, true);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Prefer", "odata.include-annotations=\"OData.Community.Display.V1.FormattedValue\"");
req.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var results = JSON.parse(this.response);
if(results.value.length > 0){
Xrm.Page.ui.setFormNotification("You have outstanding tasks assigned to you.", "WARNING", uniqueNotificationId)
}
}
else {
//.. handle error
}
}
};
req.send();
}
*This post is locked for comments