KB3008923 Makes Microsoft Dynamic CRM 2013 add/change javascript in Form Dialog impossible - Fix is use CHROME or remove update.
After KB3008923 was installed on my computer we found out that in Microsoft Dynamic Crm 2013
we could not change Form Script or add Form scripts as the dialog adding/maintaining this did not work
any more. The dropdown box is empty and the function and parameters are gone.
Fix is to remove KB3008923 or use CHROME until Microsoft fixes it!
REPOSTING...
Some web application modal dialog boxes don't work correctly in Internet Explorer 11 after you install update 3008923 (17 Dec-14)
http://support2.microsoft.com/kb/3025390/en-us
~Robear Dyer (PA Bear) MS MVP-Windows Client since 2002 Disclaimer: MS MVPs neither represent nor work for Microsoft
Similar Messages
-
Coded UI automation support for MIcrosoft Dynamic CRM 2013
Hi,
I have been checking for a UI automation tool for Microsoft Dynamic CRM 2013. Even though it is mentioned as coded UI fully supports Dynamic CRM, I was not able to automate CRM with VS2013, VS2015 Preview. Please reply if you have any workaround to make
it possible to automate UI testing of CRM 2013 using coded UI.
Regards,
Vinu chandran.Hi Vinu,
According to your description,
could you please tell me what version of VS you use to test your coded UI test?
In addition, I did some search and don’t find any information about CRM2013 support for Coded UI test.
Based on this article:
Supported Configurations and Platforms for Coded UI Tests and Action
Recordings, Dynamics CRM web client is fully supported. Even though I am not sure whether it includes CRM2013, I suggest you should use VS to drag the crosshair
on the control to check the control can be identified by Coded UI Test.
In addition, since the issue is related to the Microsoft Dynamic CRM, I suggest you can ask the issue to
Microsoft Dynamic
CRM forum, may be you will get better support.
As you said that you are not able to automate coded UI test with VS2015 Preview, because VS2015 Preview is still a preview version
instead of final released version, I suggest that you should submit this feedback to Microsoft Connect feedback portal:
http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,
Microsoft engineers will evaluate them seriously.
After you submit the feedback, you can post the link here which will be beneficial for other members with the
similar issue.
Thanks for your understanding.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Dynamic CRM 2013 Online how to execute Report, generate PDF and email
Dear All,
I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
quote form.
I am using the attached code, but facing various issues.
1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
alert("emailid" + emailid.toString());
3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var Xrm;
if (window.opener) { Xrm = window.opener.Xrm; }
else if (window.parent) { Xrm = window.parent.Xrm; }
function getReportingSession() {
var reportName = "Quotation_Report"; //set this to the report you are trying to download
var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
var recordid = Xrm.Page.data.entity.getId();
// recordid = recordid.substring(1, 37); //getting rid of curly brackets
alert(recordid);
var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
var retrieveEntityReq = new XMLHttpRequest();
retrieveEntityReq.open("POST", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
var ret = new Array();
ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
x = retrieveEntityReq.responseText.indexOf("ControlID=");
ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
return ret;
function createEntity(ent, entName, upd) {
var jsonEntity = JSON.stringify(ent);
var createEntityReq = new XMLHttpRequest();
var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
createEntityReq.setRequestHeader("Accept", "application/json");
createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
createEntityReq.send(jsonEntity);
var newEntity = JSON.parse(createEntityReq.responseText).d;
alert("new entity" + newEntity);
return newEntity;
function createAttachment() {
var params = getReportingSession();
var recordid = Xrm.Page.data.entity.getId();
alert("recordid " + recordid);
var orgName = Xrm.Page.context.getOrgUniqueName();
var userID = Xrm.Page.context.getUserId();
//create email record
// Prepare the SOAP message.
var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
"<soap:Header>" +
"</soap:Header>" +
"<soap:Body>" +
"<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
"<entity xsi:type='email'>" +
"<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
"<subject>" + "Email with Attachment4" + "</subject>" +
"</entity>" +
"</Create>" +
"</soap:Body>" +
"</soap:Envelope>";
// Prepare the xmlHttpObject and send the request.
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Content-Length", xml.length);
xHReq.send(xml);
// Capture the result
var resultXml = xHReq.responseXML;
// alert("resultXml " + resultXml);
// Check for errors.
var errorCount = resultXml.selectNodes('//error').length;
if (errorCount != 0) {
alert("ERROR");
var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
alert(msg);
var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
alert("emailid" + emailid.toString());
//var emailid = userID;
var post = Object();
post.Body = encodePdf(params);
var email = new Array();
email[0] =new Object();
email[0].id = emailid;
email[0].entityType ='email';
post.Subject ="File Attachment";
post.AttachmentNumber = 1;
post.FileName ="Report.pdf";
post.MimeType ="application/pdf";
post.ObjectId = Object();
post.ObjectId.LogicalName ="email";
post.ObjectId.Id = email[0].id;
post.ObjectTypeCode ="email";
alert(post.ObjectId.Id);
createEntity(post,"ActivityMimeAttachment", "");
alert("created successfully");
email.Subject = "Your Order";
//Set The current order as the Regarding object
email.RegardingObjectId = {
Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
//Create Email Activity
SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
// Email Call Back function
function EmailCallBack(result) {
email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
var activityPartyFrom = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyFrom.PartyId = {
Id: customerId, // id of entity you want to associate this activity with.
LogicalName: "contact"
// Set the "activity" of the ActivityParty
activityPartyFrom.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
// Create the from ActivityParty for the email
SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
var activityPartyTo = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyTo.PartyId = {
Id: ownerId, // id of entity you want to associate this activity with.
LogicalName: "systemuser"
// Set the "activity" of the ActivityParty
activityPartyTo.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity). activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
// Create the from ActivityParty
SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
//ActivityParty From Callback
function ActivityPartyFromCallBack(result) {
//ActivityParty To Callback
function ActivityPartyToCallBack(result) {
var StringMaker = function () {
this.parts = [];
this.length = 0;
this.append = function (s) {
this.parts.push(s);
this.length += s.length;
this.prepend = function (s) {
this.parts.unshift(s);
this.length += s.length;
this.toString = function () {
return this.parts.join('');
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
var output = new StringMaker();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
while (i < input.length) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
else if (isNaN(chr3)) {
enc4 = 64;
output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
return output.toString();
var bdy = new Array();
var bdyLen = 0;
function concat2Bdy(x) {
bdy[bdyLen] = x;
bdyLen++;
function encodePdf(params) {
bdy = new Array();
bdyLen = 0;
var retrieveEntityReq = new XMLHttpRequest();
var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
retrieveEntityReq.open("GET", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.send();
BinaryToArray(retrieveEntityReq.responseBody);
return encode64(bdy);
</SCRIPT>
<SCRIPT type=text/vbscript>
Function BinaryToArray(Binary)
Dim i
ReDim byteArray(LenB(Binary))
For i = 1 To LenB(Binary)
byteArray(i-1) = AscB(MidB(Binary, i, 1))
concat2Bdy(AscB(MidB(Binary, i, 1)))
Next
BinaryToArray = byteArray
End Function
</SCRIPT>
</head>
<body>
<input type="button" onclick="createAttachment();" value="Attach Report" />
</body>
</html>
Thanks. and waiting for your valuable comments.
- MittalHello,
Yes, I was able to make my code working as below. Tested on CRM online 2013.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
if (typeof (SDK) == "undefined")
{ SDK = { __namespace: true }; }
SDK.JScriptRESTDataOperations = {
_context: function () {
if (typeof GetGlobalContext != "undefined")
{ return GetGlobalContext(); }
else {
if (typeof Xrm != "undefined") {
return Xrm.Page.context;
else { return new Error("Context is not available."); }
_getServerUrl: function () {
var serverUrl = this._context().getServerUrl()
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
return serverUrl;
_ODataPath: function () {
return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
_errorHandler: function (req) {
return new Error("Error : " +
req.status + ": " +
req.statusText + ": " +
JSON.parse(req.responseText).error.message.value);
_dateReviver: function (key, value) {
var a;
if (typeof value === 'string') {
a = /Date\(([-+]?\d+)\)/.exec(value);
if (a) {
return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
return value;
Create: function (object, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 201) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send(JSON.stringify(object));
Retrieve: function (id, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 200) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
Update: function (id, object, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "MERGE");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 204 || this.status == 1223) {
successCallback();
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send(JSON.stringify(object));
Delete: function (id, type, successCallback, errorCallback) {
var req = new XMLHttpRequest();
req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "DELETE");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 204 || this.status == 1223) {
successCallback();
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
if (filter != null) {
filter = "?" + filter;
else { filter = ""; }
var req = new XMLHttpRequest();
req.open("GET", this._ODataPath() + type + "Set" + filter, true);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.onreadystatechange = function () {
if (this.readyState == 4 /* complete */) {
if (this.status == 200) {
successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
else {
errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
req.send();
__namespace: true
</script>
<script type="text/javascript">
//Create Email and link it with Order as Regarding field
var Xrm;
var email = new Object();
var ownerID = "";
var CustomerId = "";
if (window.opener) { Xrm = window.opener.Xrm; }
else if (window.parent) { Xrm = window.parent.Xrm; }
//Get ownerid who send email of quotation to customer
function GetOwnerID() {
var owner = Xrm.Page.getAttribute("ownerid").getValue();
ownerID = owner[0].id;
var ownerName = owner[0].name;
var entityType = owner[0].entityType;
GetToEmailGUID();
//Get customerid who receive email of quotation from owner
function GetToEmailGUID() {
var Customer = Xrm.Page.getAttribute('customerid').getValue();
CustomerId = Customer[0].id;
var CustomerName = Customer[0].name;
var entityType = Customer[0].entityType;
//if CustomerId is type of "Account" then get Primary Contact id of that account
if (entityType == "account") {
var contact = Xrm.Page.getAttribute("customerid").getValue();
if (contact === null) return;
var serverUrl = Xrm.Page.context.getClientUrl();
var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
var req = new XMLHttpRequest();
req.open("GET", oDataSelect, false);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
req.onreadystatechange = function () {
if (req.readyState === 4) {
if (req.status === 200) {
var retrieved = JSON.parse(req.responseText).d;
CustomerId = retrieved.PrimaryContactId.Id;
else {
alert(this.statusText);
req.send();
function CreateEmail() {
GetOwnerID();
email.Subject = "Email with Report Attachment";
//Set The current order as the Regarding object
email.RegardingObjectId = {
Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
//Create Email Activity
SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
// Email Call Back function
function EmailCallBack(result) {
email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
var activityPartyFrom = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyFrom.PartyId = {
Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
LogicalName: "contact"
// Set the "activity" of the ActivityParty
activityPartyFrom.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
// Create the from ActivityParty for the email
SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
var activityPartyTo = new Object();
// Set the From party of the ActivityParty to relate an entity with Email From field
activityPartyTo.PartyId = {
Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
LogicalName: "systemuser"
// Set the "activity" of the ActivityParty
activityPartyTo.ActivityId = {
Id: result.ActivityId,
LogicalName: "email"
// Now set the participation type that describes the role of the party on the activity).
activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
// Create the from ActivityParty
SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
//ActivityParty From Callback
function ActivityPartyFromCallBack(result) {
//ActivityParty To Callback
function ActivityPartyToCallBack(result) {
GetReportId('Quotation');
//Create attachment for the created email
function CreateEmailAttachment() {
//get reporting session and use the params to convert a report in PDF
var params = getReportingSession();
//Email attachment parameters
var activitymimeattachment = Object();
activitymimeattachment.ObjectId = Object();
activitymimeattachment.ObjectId.LogicalName = "email";
activitymimeattachment.ObjectId.Id = email.ActivityId;
activitymimeattachment.ObjectTypeCode = "email",
activitymimeattachment.Subject = "File Attachment";
activitymimeattachment.Body = encodePdf(params);
activitymimeattachment.FileName = "Report.pdf";
activitymimeattachment.MimeType = "application/pdf";
//Attachment call
SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
//ActivityMimeAttachment CallBack function
function ActivityMimeAttachmentCallBack(result) {
var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
var width = "800px";
var height = "600px";
window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
// To open window which works in outlook and IE both
//openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width, height, features);
//This method will get the reportId based on a report name that will be used in getReportingSession() function
function GetReportId(reportName) {
var oDataSetName = "ReportSet";
var columns = "ReportId";
var filter = "Name eq '" + reportName + "'";
retrieveMultiple(oDataSetName, columns, filter, onSuccess);
function retrieveMultiple(odataSetName, select, filter, successCallback) {
var serverUrl = Xrm.Page.context.getServerUrl();
var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
if (select) {
odataUri += "$select=" + select + "&";
if (filter) {
odataUri += "$filter=" + filter;
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: odataUri,
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
success: function (data) {
if (successCallback) {
if (data && data.d && data.d.results) {
successCallback(data.d.results);
else if (data && data.d) {
successCallback(data.d);
else {
successCallback(data);
error: function (XmlHttpRequest, errorThrown) {
if (XmlHttpRequest && XmlHttpRequest.responseText) {
alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
function onSuccess(data) {
reportId = data[0].ReportId.replace('{', ").replace('}', ");
CreateEmailAttachment(); // Create Email Attachment
//Gets the report contents
function getReportingSession() {
var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
var retrieveEntityReq = new XMLHttpRequest();
var Id = Xrm.Page.data.entity.getId();
var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
quotationGUID = quotationGUID.replace('}', "");
var reportName = "Quotation"; //set this to the report you are trying to download
var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
var rptPathString = ""; //set this to the CRMF_Filtered parameter
var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
retrieveEntityReq.open("POST", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" +
reportName + "&isScheduledReport=false&p:CRMAF_Filteredquote=" + strParameterXML;
//remove the part starting from &p:salesorderid if your report has no parameters
retrieveEntityReq.send(rptPathString);
var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
var ret = new Array();
ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
x = retrieveEntityReq.responseText.indexOf("ControlID=");
ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
return ret;
var bdy = new Array();
var bdyLen = 0;
function concat2Bdy(x) {
bdy[bdyLen] = x;
bdyLen++;
function encodePdf(params) {
bdy = new Array();
bdyLen = 0;
var retrieveEntityReq = new XMLHttpRequest();
var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
"&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
"&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
retrieveEntityReq.open("GET", pth, false);
retrieveEntityReq.setRequestHeader("Accept", "*/*");
retrieveEntityReq.send();
BinaryToArray(retrieveEntityReq.responseBody);
return encode64(bdy);
var StringMaker = function () {
this.parts = [];
this.length = 0;
this.append = function (s) {
this.parts.push(s);
this.length += s.length;
this.prepend = function (s) {
this.parts.unshift(s);
this.length += s.length;
this.toString = function () {
return this.parts.join('');
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function encode64(input) {
var output = new StringMaker();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
while (i < input.length) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
return output.toString();
</script>
<script type="text/vbscript">
Function BinaryToArray(Binary)
Dim i
ReDim byteArray(LenB(Binary))
For i = 1 To LenB(Binary)
byteArray(i-1) = AscB(MidB(Binary, i, 1))
concat2Bdy(AscB(MidB(Binary, i, 1)))
Next
BinaryToArray = byteArray
End Function
</script>
</head>
<body>
<input type="button" onclick="CreateEmail();" value="Attach Report" />
</body>
</html>
Thank you,
Mittal. -
Hello,
Can anybody let me know if it is possible to enable document management for entities through PowerShell script for Dynamic CRM 2013 on premises.
I want power shall script where user will give the entity (Accounts, Contacts etc.) for the CRM.
The script should enable the document management for the entity.
Thank you for your support.Hi Jeff,
Any updates? If you have any other questions, please feel free to let me know.
A little clarification to the script:
function _ErrObject{
Param($name,
$errStatus
If(!$err){
Write-Host "error detected"
$script:err = $True
$ErrObject = New-Object -TypeName PSObject
$Errobject | Add-Member -Name 'Name' -MemberType Noteproperty -Value $Name
$Errobject | Add-Member -Name 'Comment' -MemberType Noteproperty -Value $errStatus
$script:ErrOutput += $ErrObject
$errOutput = @()
_ErrObject Name, "Missing External Email Address"
$errOutput
_ErrObject Name "Missing External Email Address"
$errOutput
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support -
Ms CRM 2013 Autosave loop in quote form.
Hi Everyone,
I have problem with autosave feature. I disabled this feature but in quote form when im triying to add quoteitem from quotedetailsGrid, form trying to save item.
And never stop. I cant enter my quoteitem's name or discount because form trying to save it every second. First of i thought my preupdate plugin cause this problem. I debugged my plugin and i realize that context.depht is always "1". So infinitive
loop continuous. Any advice?
http://fuattatar.blogspot.com.tr/Just want to let you know that this will be fixed in Service pack 1 for CRM 2013.
http://support.microsoft.com/kb/2941390
Users of Microsoft Dynamics CRM 2013 Update Rollup will notice that the Save and Close button does not save appointments or recurring appointments they've entered. -
Error while installing the Microsoft Dynamics CRM 2013 Report Authoring Extension set up
HI Experts,
I am trying to install Report Authoring extension tool to work with MS CRM 2015 online reports but unable to install, getting below error even though I am having VS 2013, SQL Server 2014 and Data tools for VS 2013 installed on my machine.
Please help me to fix this issue.
When I double click the error getting below error.
Error : Business Intelligence Development Studio is not installed for Microsoft SQL Server Reporting Services.
When I click the details , getting below error.
Thanks
Baji RahamanThe Report Authoring Extensions (any version) don't support VS 2013. Currently the Crm 2015 Report Authoring Extensions support VS 2012 and VS 2010, and the Crm 2013 Report Authoring Extensions supports only VS 2010.
By the way, the error you posted suggests you're trying to install the Crm 2011 Report Authoring Extensions
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk -
Microsoft Dynamic CRM Data Archiving solution
Hi,
How can i archive data in dynamic CRM.
e.g. If i have last 20 years data in dynamic CRM then i wants to archive data in another organization and then retrieve in same organization.
If this process is available in dynamic CRM or how can i create this tool for the same.
Please suggest me for this.
ThanksHi Narendra,
Recently i implemented the Data Archiving in CRM 2011 in supported way.
We identified the entities where the volume of data is very high over the period like case, opportunity, activity, system jobs, lead etc.
I am using "SSIS Integration Toolkit v5.1 for Microsoft Dynamics CRM" from KingswaySoft to create and delete the data.
I created a new organization same as main organization. In new organization i create the closed case, opportunity, activity, lead from main organization and once done i delete them from main organization. This exercise we execute in every 3 months. We always
delete the completed system jobs from main organization. And we provided the access to new organization only to few admin users just for reporting purpose.
Chandan - http://mscrm-chandan.blogspot.in/ I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful !!! -
If incorrect forum, just alert and move. I am having an issue with hosted Microsoft Dynamics 2013 and Google Chrome latest release, 31. This just started with the hosted version of Dynamics CRM 2013, Chrome had been working correctly with
our earlier version of CRM.
When users on latest version of Chrome, 31, login to Dynamics CRM 2013, everything looks fine. Issue is specifically, for sales folks, when they open a client record, and where the client info is located, there is a standard date and time and tiny
little calendar you can pull up if you click on it. When the user clicks on the tiny little calendar, they DO get a pop up, but the pop up is blank. And, there is no error message at all. Nothing freezes, nothing bad happens at all, except
for the salesperson, who live and die by their calendars and ability to schedule appointments and see exiting appointments.
This is not some in house coding issue. It is a generic CRM phone call record that has this issue.
Again, no errors, nothing crashes, but Dynamics CRM 2013 is useless to Google Chrome users in house because of this. Which, in a support position, is terrible. Users who got an upgrade, have their favorite interface rendered useless. And these
are sales folks. And, I did all settings according to what I was able to find for CRM 2010 and Chrome, for when pop ups do not work, and all settings were already correct for pop ups, website is in trusted sites, etc, which is what I expected, since
everything worked on CRM 2010.
Any clues or ideas? Thank You.
RickWe don't know. Better to ask over here.
https://community.dynamics.com/crm/f/117.aspx
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
Hi,
We get the following error in the logfile when we try to install the latest update for CRM: (KB2953252)
Does anyone know how to fix this problem?
09:10:41| Info| Database update install failed for orgId = 35e7ca08-43fb-4440-ba18-acfc3f42e115. Continuing with other orgs. Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.OrgInstall(ArrayList orgIdArray)Hi,
We get the following error in the logfile when we try to install the latest update for CRM: (KB2953252)
Does anyone know how to fix this problem?
09:10:41| Info| Database update install failed for orgId = 35e7ca08-43fb-4440-ba18-acfc3f42e115. Continuing with other orgs. Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.OrgInstall(ArrayList orgIdArray) -
Does Eloqua Integrate with MicroSoft Dynamics CRM 2013 and or 2015
We are planning to upgrade from Dynamics CRM 2011 to 2013 or 2015. I cannot find information to confirm Eloqua will integrate with the newer versions of Dynamics CRM. I 'hear' Eloqua will integrate with 2013. Does anyone integrate Eloqua with Dynamics 2013 or 2015?
Hello-
We actually integrate with MS Dynamics, both 2013 and 2015 versions and would gladly help you.
Feel free to visit our website for more info: www.putitforward.com/omc
Here's a video on our YouTube channel about MS Dynamics 15 to Eloqua integration.
Hope this helps!
If you have any additional questions, let me know and I'll send you more info. -
Yesterday I installed the Babylon translate program with toolbar. It changed my homepage, which was 'kpnvandaag.nl'. I de-installed the Babylon program and the toolbar, I resetted my computer to a status for a few days ago, before anything with Babylon occurred. I cleaned what I could clean, but it stays very aggressively present as a home page.
I do not want anything of Babylon anymore, but I cannot find the keys for restoring the situation with my former homepage.
What to do?
Thanks for answering
GuusBasic help for Accessibility features in Adobe/Acrobat Reader is available at https://helpx.adobe.com/acrobat/using/accessibility-features-pdfs.html
I have never used any of the Accessibility features in Reader, so I can't give you any practical tips. But you write that "I've set the options under Preferences for 'Replace Document Colors', but nothing changes."
I just did a little test (Reader 11.0.10 on Windows 7), and I had no problems replacing document colors. Img 1: original, img 2: changed background. -
Dynamic Hyperlink in SSRS 2008 for CRM 2013 online
Hi All,
I have a report which displays contact name and contactid from contact table
I need a link to the contact name which open the CRM record
Is this possible ?
Any suggestion most appreciated
Thanks
Pradnya07Hi
i been using this url for help
http://h30507.www3.hp.com/t5/Applications-Services-Blog/Microsoft-Dynamics-CRM-2013-SSRS-drill-down-reports-Part-II/ba-p/149943
but it didnt worked i get the below error
Any help much appreciated
Thanks
Pradnya07 -
Adding Custom report url or short-cut to Command bar - CRM 2013
Hello all,
I would like to add short-cut to one of our custom report in Account Screen near [Run report] action button.
Is this possible and how? any third party tool?
Current version is MS CRM 2013.
hussainYes, Ribbon workbench is one of tool can be used for this..
https://www.develop1.net/public/Download%20Ribbon%20Workbench%202013.aspx
https://ribbonworkbench.uservoice.com/knowledgebase/articles/71374-1-getting-started-with-the-ribbon-workbench
MayankP
My Blog
Follow Me on Twitter -
Outgoing emails on CRM 2013 Online
I've set up two outgoing server profiles. One for GMAIL and one for Exchange Online. I am currently using trials of both.
I set the mailboxes of queues to use the correct profiles and to use server-side sync or email router for both incoming and outgoing.
For both accounts (one using Exchange profile other using GMAIL), the mailbox tests succeed. The queues also pull in emails. Bot for both, emails I send just sit in Pending Send saying the msg has not yet been submitted for delivery.
Is there a limitation for trial instances with regard to outgoing email?Using Gmail with Microsoft Dynamics CRM 2013
Link: https://www.youtube.com/watch?v=uH3H-vfauZU -
MS Dynamics CRM 2013 install via GPO
Good Morning,
I need to rollout MS Dynamics CRM 2013 to all 180 of my users. I would like to do this via GPO but I only have the .exe install files and no .msi files. I have adhered to the following -
http://technet.microsoft.com/en-us/library/hh699775.aspx
I have followed the steps under the section Create the CRMCLient_bitversion.msi file
but I am not achieving any administrative installation files. For example I have a network share setup as follows -
\\server\crm_files\test
I have mapped a network folder via command prompt using the net use command to map the Z: drive to
\\server\crm_files. As per the instructions I have run the following command -
CRM2013-Client-ENU-i386.exe /a /q /targetdir \\server\crm_files\test
When I run this command I am prompted to click Run or Cancel so I click Run. After 2-3 seconds I then get a dialog box showing the different switches that I can run with the only other option being to close the box. After closing the box I look in my
test folder and it is empty.
Should there be something in the test folder? Have I run the wrong command string?
EDIT: Please note that I only have the installation/.exe file for CRM 2013. The article on the link I posted earlier mentions an XML file that is included with the installation files. I do not have this XML file.
Jeet SHi,
Have you checked this article?
Install Microsoft Dynamics CRM for Outlook using a command prompt
==============
CRM2013-Client-ENU-i386.exe /a /q /targetdir \\server\crm_files\test
The command here is not in the right way, we need first to extract files from the
CRM2013-Client-ENU-i386.exe, under the folder we will find the
SetupClient.exe and the mentioned XML files.
Run this command to extract the file:
CRM2013-Client-ENU-i386.exe /extract
Then use the command below to create an MSI file:
Setupclient /Q /A /targetdir "\\share\mscrm_client_admin"
Besides, for Microsoft Dynamics CRM 2013 deployment, we'd better ask in the forum below:
Microsoft Dynamics CRM Forum
http://community.dynamics.com/crm/f/117.aspx?pi49901=0
Best regards
Michael Shao
TechNet Community Support
Maybe you are looking for
-
The new version of Firefox dosen't work is only a black screen without buttons and scroll bars. I try re install and uninstall and erase files, but dosen't work.
-
Song order in playlists arnt correct on phone
Hey folks, It seems that when ordering songs in a playlist by date added, they dont display in that order on my 3GS. They do display correctly on my iPod classic. Im running OS 3.1.3 Any ideas?
-
Most of the time siri works fairly well, but there are a good amount of times where it just stops "listening" and starts searching. Like ill say Find directions to...and it jumps ahead and starts searching before i can say where i want directions too
-
Where are the xml files for code generator of MSAHH5?
I'm generating source files for MSAHH5 and in the source code I can find xml files for generating all entities and DAL for those entities but I can't find anywhere files for MSATableConstants.xsl and MSAPersistanceManager.xsl and if I leave them alon
-
Color shift between Ai and the web ... again
Hi there, Classic problem again ... color never seems to let me rest in peace Well, I copied colors hex numbers from this palette http://www.colourlovers.com/palette/2077685/Stargazer When I fill 5 squares in Illustrator, each one with the palette's