After updating to v9, we are running into some issues for IE11 users. Our solution contains a custom button on the command bar for the case entity. This button is no longer working with IE11 after the update. It is working as intended in Chrome, Firefox, and Edge.
We have a custom command with javascript connected to this button, but this javascript doesn't appear to be reached in IE11. I tested this by adding the debugger; keyword to the top of the command method... debugger does not hit the breakpoint. Not even when all other code in the method is commented out.
Has anyone ran into similar issues with IE11? Please let me know if you have!
Please ignore duplicate reply, as form did not give notification that submission was successful
Thanks for the attention! I have tried all these already.
A shortened version of my WebResource code is below. The customized button is hooked up to the ribbon_ResolveCaseScript function.
var MyCompany= MyCompany || {};
MyCompany.Crm = MyCompany.Crm || {};
MyCompany.Crm.Entities = MyCompany.Crm.Entities || {};
Type.registerNamespace("Mscrm");
Mscrm.CustomActions = function () { };
Mscrm.CustomUtilities = function () { };
Mscrm.CustomUtilities.DialogConfirmStrings = function () { };
(function () {
"use strict";
MyCompany.Crm.Entities.Case = {
DAYS_TO_INITIAL_LETTER_SENT: "new_daystoinitiallettersent",
DAYS_TO_RESOLUTION: "new_daystoresolved",
DATE_CASE_OPENED: "myc_datecaseopened",
INITIAL_LETTER_SENT: "myc_actualinitialresolutiondate",
FINAL_LETTER_SENT: "myc_actualfinalresolutiondate",
RESOLVED_IN_20_BUSINESS_DAYS: "myc_resolvedin20businessdays",
TWENTY_BUSINESS_DAYS: "myc_targetresolution20businessdaysdate",
DATE_OPENED: "myc_datecaseopened",
ribbonClose: false,
STATE_CODE: "statecode",
STATE_CODE_RESOLVED: 1,
STATE_CODE_CANCELED: 2,
STATUS_CODE: "statuscode",
STATUS_CODE_CLOSED: 854980008,
STATUS_CODE_PROBLEM_RESOLVED: 5,
STATUS_CODE_NOTIFIED_DEPARTMENT: 854980009,
STATUS_CODE_NO_IMMEDIATE_ACTION_REQUIRED: 854980010,
CASE_LOGICALNAME: "incident",
RESOLVED_ON: "myc_resolvedon",
RESOLUTION_TYPE: "myc_resolutiontype",
RESOLUTION_TYPE_PROBLEM_RESOLVED: 854980000,
RESOLUTION_TYPE_NOTIFIED_DEPARTMENT: 854980001,
RESOLUTION_TYPE_NO_IMMEDIATE_ACTION_REQUIRED: 854980002,
ribbon_ResolveCaseScript: function () {
debugger;
me.ribbonClose = true;
var recordId = Xrm.Page.data.entity.getId().replace(/[{}]/g, "");
var resolutionValue = Xrm.Page.getAttribute(me.RESOLUTION_TYPE).getValue();
Xrm.Page.getAttribute(me.RESOLVED_ON).setValue(new Date());
Xrm.Page.data.entity.save();
var completedStatusUpdate = null;
if (resolutionValue === me.RESOLUTION_TYPE_PROBLEM_RESOLVED) {
completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_PROBLEM_RESOLVED);
}
else if (resolutionValue === me.RESOLUTION_TYPE_NOTIFIED_DEPARTMENT) {
completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_NOTIFIED_DEPARTMENT);
}
else if (resolutionValue === me.RESOLUTION_TYPE_NO_IMMEDIATE_ACTION_REQUIRED) {
completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_NO_IMMEDIATE_ACTION_REQUIRED);
}
else {
completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_CLOSED);
}
},
changeRecordStatus: function (EntityLogicalName, RECORD_ID, stateCode, statusCode) {
// create the SetState request
var request =
`<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="schemas.xmlsoap.org/.../">
<s:Body>
<Execute xmlns="schemas.microsoft.com/.../Services" xmlns:i="www.w3.org/.../XMLSchema-instance">
<request xmlns:a="schemas.microsoft.com/.../Contracts" xmlns:b="schemas.microsoft.com/.../Contracts" i:type="b:CloseIncidentRequest">
<a:Parameters xmlns:c="schemas.datacontract.org/.../System.Collections.Generic">
<a:KeyValuePairOfstringanyType>
<c:key>IncidentResolution</c:key>
<c:value i:type="a:Entity">
<a:Attributes>
<a:KeyValuePairOfstringanyType>
<c:key>` + EntityLogicalName + `id</c:key>
<c:value i:type="a:EntityReference">
<a:Id>` + RECORD_ID + `</a:Id>
<a:LogicalName>` + EntityLogicalName + `</a:LogicalName>
<a:Name i:nil="true" />
</c:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<c:key>subject</c:key>
<c:value xmlns:d="www.w3.org/.../XMLSchema" i:type="d:string">Closed</c:value>
</a:KeyValuePairOfstringanyType>
</a:Attributes>
<a:EntityState i:nil="true" />
<a:FormattedValues />
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>incidentresolution</a:LogicalName>
<a:RelatedEntities />
</c:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<c:key>Status</c:key>
<c:value i:type="a:OptionSetValue">
<a:Value>` + statusCode + `</a:Value>
</c:value>
</a:KeyValuePairOfstringanyType>
</a:Parameters>
<a:RequestId i:nil="true" />
<a:RequestName>CloseIncident</a:RequestName>
</request>
</Execute>
</s:Body>
</s:Envelope>`;
//send set state request
return parent.$.ajax({
type: "POST",
contentType: "text/xml; charset=utf-8",
datatype: "xml",
url: Xrm.Page.context.getClientUrl() + "/XRMServices/2011/Organization.svc/web",
data: request,
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/xml, text/xml, */*");
XMLHttpRequest.setRequestHeader("SOAPAction", "schemas.microsoft.com/.../Execute");
},
success: function (data, textStatus, XmlHttpRequest) {
Xrm.Page.data.refresh(); // refresh current crm form
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
}
};
var me = MyCompany.Crm.Entities.Case;
}).call(this);
I have tried all of the above. My WebResource code is below. The customized button is hooked up to the ribbon_ResolveCaseScript function. I'd like to re-iterate that the debugger method is not hit in IE 11.
var MyCompany= MyCompany || {}; MyCompany.Crm = MyCompany.Crm || {}; MyCompany.Crm.Entities = MyCompany.Crm.Entities || {}; Type.registerNamespace("Mscrm"); Mscrm.CustomActions = function () { }; Mscrm.CustomUtilities = function () { }; Mscrm.CustomUtilities.DialogConfirmStrings = function () { }; (function () { "use strict"; MyCompany.Crm.Entities.Case = { DAYS_TO_INITIAL_LETTER_SENT: "new_daystoinitiallettersent", DAYS_TO_RESOLUTION: "new_daystoresolved", DATE_CASE_OPENED: "myc_datecaseopened", INITIAL_LETTER_SENT: "myc_actualinitialresolutiondate", FINAL_LETTER_SENT: "myc_actualfinalresolutiondate", RESOLVED_IN_20_BUSINESS_DAYS: "myc_resolvedin20businessdays", TWENTY_BUSINESS_DAYS: "myc_targetresolution20businessdaysdate", DATE_OPENED: "myc_datecaseopened", ribbonClose: false, STATE_CODE: "statecode", STATE_CODE_RESOLVED: 1, STATE_CODE_CANCELED: 2, STATUS_CODE: "statuscode", STATUS_CODE_CLOSED: 854980008, STATUS_CODE_PROBLEM_RESOLVED: 5, STATUS_CODE_NOTIFIED_DEPARTMENT: 854980009, STATUS_CODE_NO_IMMEDIATE_ACTION_REQUIRED: 854980010, CASE_LOGICALNAME: "incident", RESOLVED_ON: "myc_resolvedon", RESOLUTION_TYPE: "myc_resolutiontype", RESOLUTION_TYPE_PROBLEM_RESOLVED: 854980000, RESOLUTION_TYPE_NOTIFIED_DEPARTMENT: 854980001, RESOLUTION_TYPE_NO_IMMEDIATE_ACTION_REQUIRED: 854980002, ribbon_ResolveCaseScript: function () { debugger; me.ribbonClose = true; var recordId = Xrm.Page.data.entity.getId().replace(/[{}]/g, ""); var resolutionValue = Xrm.Page.getAttribute(me.RESOLUTION_TYPE).getValue(); Xrm.Page.getAttribute(me.RESOLVED_ON).setValue(new Date()); Xrm.Page.data.entity.save(); var completedStatusUpdate = null; if (resolutionValue === me.RESOLUTION_TYPE_PROBLEM_RESOLVED) { completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_PROBLEM_RESOLVED); } else if (resolutionValue === me.RESOLUTION_TYPE_NOTIFIED_DEPARTMENT) { completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_NOTIFIED_DEPARTMENT); } else if (resolutionValue === me.RESOLUTION_TYPE_NO_IMMEDIATE_ACTION_REQUIRED) { completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_NO_IMMEDIATE_ACTION_REQUIRED); } else { completedStatusUpdate = me.changeRecordStatus(me.CASE_LOGICALNAME, recordId, me.STATE_CODE_RESOLVED, me.STATUS_CODE_CLOSED); } }, changeRecordStatus: function (EntityLogicalName, RECORD_ID, stateCode, statusCode) { // create the SetState request var request = `<?xml version="1.0" encoding="UTF-8"?> <s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"> <s:Body> <Execute xmlns="schemas.microsoft.com/.../Services" xmlns:i="www.w3.org/.../XMLSchema-instance"> <request xmlns:a="schemas.microsoft.com/.../Contracts" xmlns:b="schemas.microsoft.com/.../Contracts" i:type="b:CloseIncidentRequest"> <a:Parameters xmlns:c="schemas.datacontract.org/.../System.Collections.Generic"> <a:KeyValuePairOfstringanyType> <c:key>IncidentResolution</c:key> <c:value i:type="a:Entity"> <a:Attributes> <a:KeyValuePairOfstringanyType> <c:key>` + EntityLogicalName + `id</c:key> <c:value i:type="a:EntityReference"> <a:Id>` + RECORD_ID + `</a:Id> <a:LogicalName>` + EntityLogicalName + `</a:LogicalName> <a:Name i:nil="true" /> </c:value> </a:KeyValuePairOfstringanyType> <a:KeyValuePairOfstringanyType> <c:key>subject</c:key> <c:value xmlns:d="www.w3.org/.../XMLSchema" i:type="d:string">Closed</c:value> </a:KeyValuePairOfstringanyType> </a:Attributes> <a:EntityState i:nil="true" /> <a:FormattedValues /> <a:Id>00000000-0000-0000-0000-000000000000</a:Id> <a:LogicalName>incidentresolution</a:LogicalName> <a:RelatedEntities /> </c:value> </a:KeyValuePairOfstringanyType> <a:KeyValuePairOfstringanyType> <c:key>Status</c:key> <c:value i:type="a:OptionSetValue"> <a:Value>` + statusCode + `</a:Value> </c:value> </a:KeyValuePairOfstringanyType> </a:Parameters> <a:RequestId i:nil="true" /> <a:RequestName>CloseIncident</a:RequestName> </request> </Execute> </s:Body> </s:Envelope>`; //send set state request return parent.$.ajax({ type: "POST", contentType: "text/xml; charset=utf-8", datatype: "xml", url: Xrm.Page.context.getClientUrl() + "/XRMServices/2011/Organization.svc/web", data: request, beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/xml, text/xml, */*"); XMLHttpRequest.setRequestHeader("SOAPAction", "schemas.microsoft.com/.../Execute"); }, success: function (data, textStatus, XmlHttpRequest) { Xrm.Page.data.refresh(); // refresh current crm form }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); } }); } }; var me = MyCompany.Crm.Entities.Case; }).call(this);
IE (including IE11) is not a modern browser, only Edge, Chrome, Firefox are. Hence some of the code may break based on your script code standard ie ES6 or ES5 standards
Open browser developer toolbar (F12) to see any error in console.
Yes, we are facing lot of script issues in IE. We have workarounds, which we can recommend after seeing your code.
Hi,
have you tried to
1. clear the cache.
2. run in private mode
3. update the browser into latest version ,
4. try in different machines
5. write a simple alert JS and try to see if this work.
share your code here.
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,902 Super User 2024 Season 2
Martin Dráb 229,302 Most Valuable Professional
nmaenpaa 101,156