CRM 2013 - Internal query related to fetching top 51 emails
Hello All,
We have recently upgraded from CRM 4 to CRM 2013. We are monitoring database server performance through one of the tool. We find that following internal query getting executed more frequently during initial business hours.
(@ModifiedOn0 datetime,@PartyId0 uniqueidentifier)
SELECT DISTINCT top 51 "email0".ModifiedOn as "modifiedon" , "email0".MessageId as "messageid" , "email0".ActivityId as "activityid" , "email0".RegardingObjectId
as "regardingobjectid" , "email0".Subject as "subject" , "email0".RegardingObjectIdYomiName as "regardingobjectidyominame" , "email0".RegardingObjectIdName
as "regardingobjectidname" , "email0".RegardingObjectTypeCode as "regardingobjecttypecode"
FROM Email as "email0" JOIN ActivityParty as "activityparty1" ON ("email0".ActivityId = "activityparty1".ActivityId
AND (("activityparty1".PartyId = @PartyId0)))
WHERE (( "email0".ModifiedOn >= @ModifiedOn0
AND "email0".MessageId is not null))
ORDER BY "email0".MessageId asc ,
"email0".ActivityId asc
I found following useful blog which mentions the reason of frequent execution of this query.
https://community.dynamics.com/crm/b/dynamicscrmsupportblog/archive/2012/10/11/crm-e-mail-tracking-part-3-tagging.aspx
My question is,
1) What will be impact if we disable email tagging option from all users? Note that, We are not using email router in our implementation.
2) Will this query executes frequently during normal business hours also? If yes, then do we have any settings to change interval of execution of this process?
Hi ,
Try to deactivate the Automatic E-Mail Tagging from Diagnostic Tool and observer the behaviour.
If it still trigger then better to look for other areas.
Regards
Ayaz
Similar Messages
-
What is the best way for email processing setup on CRM 2013 (on- premises) Set up?
We need to notify customers via CRM 2013 for some activities.
I searched regarding email processing set up, and i found two options:
1. via outlook
2. Via Exchange Server.
Tried through email router (exchange server), but it requires exchange online or SMTP for outgoing profile.
I do have exchange on premise setup, I am not sure about SMTP option.
My queries are:
> Can we configure Exchange server to work as Exchange Online?
> what other option, I can try for email Processing?
looking for your suggestions...
Thanks in advance!If you have Exchange onPremise, then you should be able to use the email router or server side sync in combination with CRM workflows (to generate the email). This is a fairly common scenario. You do not need Exchange Online.
http://technet.microsoft.com/en-us/library/dn531109(v=crm.6).aspx
http://technet.microsoft.com/en-us/library/dn531050(v=crm.6).aspx
http://www.microsoft.com/en-us/download/details.aspx?id=40342
Regards, Donna -
Query related to Internal Table
Hi ,
I have a small query related to internal table , can we dump millions of records to an internal .
The actual requirment is like i need to develop a report in BI side where i have to dump records into an internal table from PSA tables without filtering .
Can we do so ....
or do we have any other option to dump the data to an internal tables .
need some tips on the same .
Thanks ,
VInay.Hello Vinay,
I believe the following extract will give you a brief idea on the size limitations for an internal table.......
Internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. <u><i>The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries.</i></u>
Hope it proved useful
Reward if helpful
Regards
Byju -
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. -
CRM 2013 Client for outlook cannot connect to CRM 2013 instance
Hoping this is the right forum couldnt see any specifically related to CRM
Ok we have recently setup an On-premise installation of Dynamics CRM 2013 and running the client on Outlook 2013 with Exchange 2010.
The CRM installation has had update rollup 1 applied to the server and outlook client
We have and IFD and ADFS deployment setup (*we require ADFS for a sister company as they will be utilising CRM also)
When we try to connect the outlook client we just keep getting prompted for credentials and it never connects.
In the log the following entries appear
12:17:08| Error| Error connecting to URL: https://internal.crm.timg.com/XRMServices/2011/Discovery.svc Exception: Microsoft.Crm.CrmException: Authentication failed
at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider`1.AuthenticateClaims()
at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider`1.SignIn()
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.SignIn(Uri endPoint, Credential credentials, AuthUIMode uiMode, IClientOrganizationContext context, Form parentWindow, Boolean retryOnError)
at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.DeploymentInfo.LoadOrganizations(AuthUIMode uiMode, Form parentWindow, Credential credentials)
at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.InternalLoadOrganizations(OrganizationDetailCollection orgs, AuthUIMode uiMode, Form parentWindow)
This occurs when setting up the configuration with either outlook opened or closed.
I was assuming somewhere along the lines it is getting hung up with the claims process for ADFS on authentication.
Any information on this would be appreciated. CRM logins work fine for users logging into the main CRM site, just the outlook client wont authenticate.Did you ever have luck fixing this? I'm having a similar issue with the login box prompting but if the users put in
[email protected] & normal password they can login without issues. But it should just be using their normal Windows credentials without a need to separately authenticate. We happen to be on Windows 2012 R2, ADFS
3.0 with our CRM 2013 install. -
CRM 2013 - Inconsistent javascript issue crash the web client and user needs to reopen
Hello,
We are using CRM 2013 on premise version and almost 600 users are using it. We have some inconsistent JavaScript issue (following is the log for same) which happens to users in a day or two. When this issue occurs user can not work in system and they have
to open new instance of CRM.
Does anybody knows about this error?
<CrmScriptErrorReport>
<ReportVersion>1.0</ReportVersion>
<ScriptErrorDetails>
<Message>Unable to get property 'location' of undefined or null reference</Message>
<Line>1</Line>
<URL>/_static/_common/scripts/main.js?ver=1676323357</URL>
<PageURL>/main.aspx#313155368</PageURL>
<Function>anonymous($p0,$p1,$p2){this.$3_3.get_currentIFrame()&&Mscrm.PerformanceTracing.write("Unload",this.$3_3.get_currentIFrame().src);this.$H_3=$p0.toString();this.$26_3();this.$1A_3();this.$1J_3();if($p0.get_isLocalServer())$p0.get_query()["pagemode"]="iframe</Function>
<CallStack>
<Function>anonymous($p0,$p1,$p2){this.$3_3.get_currentIFrame()&&Mscrm.PerformanceTracing.write("Unload",this.$3_3.get_currentIFrame().src);this.$H_3=$p0.toString();this.$26_3();this.$1A_3();this.$1J_3();if($p0.get_isLocalServer())$p0.get_query()["pagemode"]="iframe";addPassiveAuthParameters($p0);var$v_0=$p0.toString();if(IsNull($p2))$p2=false;var$v_1=this.$18_3($p0,$p2);if($v_1){if(this.$2z_3()){window.location.reload();return}this.$2d_3();this.$1s_3();Mscrm.PerformanceTracing.write("Navigate",$v_0);!Mscrm.Utilities.isIE()&&this.raiseEvent(Mscrm.ScriptEvents.UpdateTopLocation,null);this.$3_3.get_currentIFrame().contentWindow.location.replace($v_0)}else{this.$10_3();var$v_2=this.get_contentWindow().Sys.Application.findComponent("crmPageManager");if($v_2){!Mscrm.Utilities.isIE()&&$v_2.raiseEvent(Mscrm.ScriptEvents.UpdateTopLocation,null);var$v_3={};$v_3["sourceUri"]=Mscrm.Utilities.getContentUrl(null);$v_2.raiseEvent(Mscrm.ScriptEvents.IFrameReactivated,$v_3)}}window.self.InnerIFrameSrcChangeTimestamp=(newDate).getTime();this.title=$p1;if(window.LOCID_UI_DIR==="RTL"&&$p0.toString().indexOf("PersonalWall")>=0&&window.UseTabletExperience)this.$3_3.get_currentIFrame().style.position="RELATIVE"}</Function>
</CallStack>
</ScriptErrorDetails>
<ClientInformation>
<BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)</BrowserUserAgent>
<BrowserLanguage>en-US</BrowserLanguage>
<SystemLanguage>en-US</SystemLanguage>
<UserLanguage>en-US</UserLanguage>
<ScreenResolution>1366x768</ScreenResolution>
<ClientName>Web</ClientName>
<ClientTime>2015-04-20T15:41:12</ClientTime>
</ClientInformation>
<ServerInformation>
<OrgLanguage>1033</OrgLanguage>
<OrgCulture>1033</OrgCulture>
<UserLanguage>1033</UserLanguage>
<UserCulture>1033</UserCulture>
<OrgID>{E8BBA7AE-A552-DE11-B475-001E0B4882E2}</OrgID>
<UserID>{614837CD-448B-DE11-A5E1-005056970D6C}</UserID>
<CRMVersion>6.1.2.112</CRMVersion>
</ServerInformation>
</CrmScriptErrorReport>Are you on-premise, or on-line? : It's on-premise
Can you reproduce it on-demand, or is it sporadic?: It's sporadic
There is a mention of loading an iFrame in the error, do you have iFrames on the form that generates this error?
It's not on specific forms, so can't identify that. Yes we have iframes on some forms.
Does it happen on any/all entity forms, or specific ones? Do the entity forms have any custom JavaScript on them?
It's not on specific forms. And yes we have javascript on almost all forms.
Do you have any network problems or slowness in your network? Does the problem happen when the network is busy?
We need to check this on next occurrence.
Do the users that see this error have any unusual add-ins or toolbars in their browser? This is not for specific user. Its happening for all randomly.
Have you tried other browsers like Chrome or FireFox and do users see the problem there as well?
We need to check only for IE. -
Issue with retrieveing the Manager of a System User in a Custom workflow - CRM 2013
Issues with custom workflow activity in CRM 2013 On-prem
I'm trying to pass the Manager of the System
here is the code that I'm running, it gets to setting the MANAGER and stops
I put the ran the FetchXML seperatly and it does return a value so I know what bit works
public class CaseAccountManagerManagersLookup : CodeActivity
// Inputs
[Input("Enter Case")]
[ReferenceTarget("incident")]
public InArgument<EntityReference> CA { get; set; }
// Outputs
[Output("Manager Output")]
[ReferenceTarget("systemuser")]
public OutArgument<EntityReference> AMOUT { get; set; }
protected override void Execute(CodeActivityContext executionContext)
// Context
IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
//Create the tracing service
ITracingService tracingService = executionContext.GetExtension<ITracingService>();
// get the account and renewals manager ID's
var CASE = CA.Get<EntityReference>(executionContext);
tracingService.Trace("Case ID = " + CASE.Id);
try
// FETCH
string fetchXml = string.Format(@"
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='incident'>
<attribute name='title' />
<attribute name='incidentid' />
<order attribute='title' descending='false' />
<filter type='and'>
<condition attribute='incidentid' operator='eq' value='{0}' />
</filter>
<link-entity name='contact' from='contactid' to='customerid' alias='ak'>
<link-entity name='account' from='accountid' to='parentcustomerid' alias='al'>
<link-entity name='systemuser' from='systemuserid' to='bc_dssalesperson' alias='am'>
<attribute name='parentsystemuserid' />
</link-entity>
</link-entity>
</link-entity>
</entity>
</fetch>", CASE.Id);
EntityCollection case_results = service.RetrieveMultiple(new FetchExpression(fetchXml));
//tracingService.Trace("fetch has run");
if (case_results.Entities.Count != 0)
foreach (var a in case_results.Entities)
//if (a.Attributes.Contains("ai_parentsystemuserid"))
tracingService.Trace("set manager id next");
var MANAGERID = (EntityReference)a.Attributes["parentsystemuserid"];
tracingService.Trace("manager id set");
AMOUT.Set(executionContext, MANAGERID);
throw new InvalidOperationException("Want to see trace");
tracingService.Trace("end ");
catch (Exception e)
throw new InvalidPluginExecutionException("Plugin - CaseAccountManagerManagerLookup - " + e.Message);
finally
throw new InvalidOperationException("Want to see trace");
PeteHello,
Try to use am.parentsystemuserid instead of just parentsystemuserid.
Dynamics CRM MVP/ Technical Evangelist at
SlickData LLC
My blog -
How to create custom report in crm 2013
Hi,
I want to create custom report in crm 2013. I want to show Contact information in report. My scenario is that when I select multiple record and run report then contact information show in different pages. I want to show record in textbox in report. Here
is an example of display recordHi Aamir,
Have a look at below link it shows step by step how to create custom SSRS report.
http://www.njevity.com/blog/creating-dynamics-crm-2011-reports-sql-reporting-services-pre-filtering-and-default-filters
It tells using fetchxml, you can use SQL query as well. You need to use pre filtering to run report on selected record.
Thanks,
Prasad
Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question. -
Hi
We have a test install of CRM 2013 which is working correctly on the server. Logon via the web is ok.
A user was setup to access through the outlook client in office13 running on a win7 platform which also worked correctly. The same user also has secondary access through the outlook client in office 13 running on a win8.1 platform. This never worked correctly
and would show credential errors.
Recently the win7 platform has also disconnected and shows connection errors.
I have tried the following on the win 7 platform:
1. Uninstall the client and reinstall from scratch - unsuccessful
2. Run through the steps in the built in trouble shooter - unsuccessful
Logon using the same creds via the web on the same machine is ok!
What are the next steps to rectify this problem?
Thanks in advance!Hi Melon,
here is the full error message and a copy of the log file is given below.
17:50:49| Info| === Microsoft Dynamics CRM for Outlook Configuration Wizard logging started: 24/03/2014 5:50:48 PM ===
17:50:49|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ClientConfig.Initialize
17:50:49| Info| Client Configuration Wizard Version : 6.0.0001.0061
17:50:49| Info| Client Configuration Wizard LanguageID : 1033
17:50:49|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.Validator.IsOutlookInitialized
17:50:49| Info| Query all rows in profile table
17:50:49| Info| Outlook is initialized
17:50:49|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.Validator.IsOutlookInitialized
17:50:49| Info| Client Configuration Wizard Running Mode : Normal
17:50:52| Info| Configuration file Type : OnPremise.
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.ConfigInfo
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetAllCRMOrgsInOutlookProfile
17:50:52| Info| Logon mapi store
17:50:52| Info| Logon admin service
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetServiceIds
17:50:52| Info| Query all rows in msg service table
17:50:52|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetServiceIds
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.CleanUpDatastoreIfNeeded
17:50:52|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.CleanUpDatastoreIfNeeded
17:50:52|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ConfigInfo.ConfigInfo
17:50:52|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.ServerForm
17:50:54|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.ServerForm
17:50:54|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.SetUIData
17:50:54|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadAvailableUrls
17:50:55|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadAvailableUrls
17:50:55|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.SetUIData
17:51:03|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:03|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:03|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:03|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:30| Info| Fill organization comboBox with server information.
17:51:35|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:35|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:35|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm.TestConnection
17:51:35|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm._testConnectionButton_Click
17:51:36| Info| Fill organization comboBox with server information.
17:51:37|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ServerForm._okButton_Click
17:51:37|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ServerForm._okButton_Click
17:51:40| Error| Exception : Metadata contains a reference that cannot be resolved: 'https://ldp-crm-01:80/LDP/XRMServices/2011/Organization.svc?wsdl'. at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper
timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri address, MetadataExchangeClientMode mode)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.GetAuthProvider(Uri endPoint, Credential credentials, AuthUIMode uiMode, Uri webEndPoint, IClientOrganizationContext context, Form parentWindow)
at Microsoft.Crm.Application.Outlook.Config.ServerInfo.LoadUserId()
at Microsoft.Crm.Application.Outlook.Config.ServerInfo.Initialize(Uri discoveryUri, OrganizationDetail selectedOrg, String displayName, Boolean isPrimary)
at Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadDataToServerInfo()
at Microsoft.Crm.Application.Outlook.Config.ServerForm.<InitializeBackgroundWorkers>b__2(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
17:51:40| Error| Exception : The underlying connection was closed: An unexpected error occurred on a send. at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
Look forward to hearing from you,
Thanks -
Hello All,
We are in process of implementing Exchange 2013 in our Organization and had a Query related to GAL.
Below is our Environment description:
01. We have a Single Forest and Single Domain Architecture.
02. We will have separate Active Directory Sites for all 3 Regions across Global.
03. Exchange 2013 will be installed in each region.
04. In APAC region Exchange 2013 Language pack for Japanese will be installed to support Japanese language.
Our Requirement:
================
01. When a Japanese User tries to browse GAL all the display names have to be displayed in Japanese language and when a user who resides other Region (Europe or AMERICAS) tries to browse GAL the Address list has to be displayed in default English Language.
Can someone guide us on how this can be achieved?
Awaiting for all your suggestions.
Thanks in advance.
Thanks & Regards,
Nagaraj N
Nagaraj NHi Nagaraj,
Here are some requirements that I am still not quite sure. Could you please provide more information about it? Such as:
1. Do you mean one user have two display names: one with Japanese language used for users in Japan, one with English language used for English users? Then we filter address lists with language difference. Based on my knowledge, one email address is generally
involved for one display name.
2. If there are both Japanese users and English Language users in the forest, and you just need Japanese users view users whose name is displayed as Japanese language. We can use
Address book policies (ABPs) to segment users into specific groups to provide customized views of your organization’s global address list (GAL).
To show different GAL for different users, we can specify the CustomAttribute1-15 property to divide your organizations. For example, we can set the CustomAttribute15 property for Japanese users to
Japan. Just like:
Set-Mailbox –Identity JapanUser1 –CustomAttribute15 Japan
Then we can create global address list for Japanese that includes all of the recipients that exists in the address lists and room address list:
New-GlobalAddressList -Name "GAL_Japan" -RecipientFilter {(CustomAttribute15 -eq "Japan")}
For detailed steps about how to create and apply the Address Book Policies, please refer to:
http://technet.microsoft.com/en-us/library/jj657455(v=exchg.150).aspx
Hope it helps.
Regards,
Winnie Liang
TechNet Community Support -
I have a query relating to SAP, specifically when using the Create New Session button. In the past when using this button, it has always created a new SAP session with the window displaying the SAP Easy Access User Menu... front end, with all my favourite transactions listed. However, recently this user menu has disappeared and the window is blank, meaning I have to type the transaction in the top left box, which, whilst not preventing use, is a little annoying and awkward!
I dont believe I have changed any options recently and can find no settings that look like they would bring the user menu back but it would be really useful if it did! (It is probably worth mentioning that this only occurs when creating a new session; when starting a new SAP session in the first instance, the user menu appears...)
Please help me out
Many Thanks,
SunnyHi,
SAP GUI version - 7.10
i am using a desktop, tried logging in another desktop ,same problem.
Recently there is a HARDWARE migration occured , might be this also effects the settings ?
please Advise.
Sunny -
Getting an error as "Access denied" while writing the data into CRM 2013?
Hi,
I have written code in Script component Transformation to connect CRM 2013. I have used CRM 2013 SDK to connect it.
#region
Help: Introduction to the Script Component
/* The Script Component allows you to perform virtually any operation that can be accomplished in
* a .Net application within the context of an Integration Services data flow.
* Expand the other regions which have "Help" prefixes for examples of specific ways to use
* Integration Services features within this script component. */
#endregion
#region
Namespaces
using
System;
using
System.Data;
using
Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using
Microsoft.SqlServer.Dts.Runtime.Wrapper;
using
Microsoft.Xrm.Sdk;
using
Microsoft.Xrm.Sdk.Query;
using
Microsoft.Xrm.Sdk.Client;
using
Microsoft.Xrm.Sdk.Messages;
using
System.ServiceModel;
using
System.ServiceModel.Description;
#endregion
[Microsoft.SqlServer.Dts.Pipeline.
SSISScriptComponentEntryPointAttribute]
public
classScriptMain:
UserComponent
//This
method is called once, before rows begin to be processed in the data flow.
///You
can remove this method if you don't need to do anything here.
IOrganizationServiceorganizationservice;
// Variables for the CRM webservice credentials
// You could also declare them in the PreExecute
// if you don't use it anywhere else
stringCrmUrl =
stringCrmDomainName =
stringCrmUserName =
stringCrmPassWord =
publicoverridevoidPreExecute()
base.PreExecute();
* Add your code here
CrmUrl =
this.Variables.CrmWebservice.ToString();
CrmDomainName =
this.Variables.CrmDomainName.ToString();
CrmUserName =
this.Variables.CrmUserName.ToString();
CrmPassWord =
this.Variables.CrmPassWord.ToString();
// Connect to webservice with credentials
ClientCredentialscredentials =
newClientCredentials();
credentials.UserName.UserName =
string.Format("{0}\\{1}",
CrmDomainName, CrmUserName);//"[email protected]";
credentials.UserName.Password = CrmPassWord;
organizationservice =
newOrganizationServiceProxy(newUri(CrmUrl),
null, credentials,
null);
///This
method is called after all the rows have passed through this component.
///You
can delete this method if you don't need to do anything here.
//</summary>
publicoverridevoidPostExecute()
base.PostExecute();
* Add your code here
///<summary>
///This
method is called once for every row that passes through the component from Input0.
//<param
name="Row">The row that is currently passing through the component</param>
publicoverridevoidInput0_ProcessInputRow(Input0BufferRow)
* Add your code here
EntityContact =
newEntity("Contact");
Contact["Employeeid"] = Row.EmpId;
if (!Row.Prefix_IsNull)
Contact["MiddleName"] = Row.Prefix;
organizationservice.Create(Contact);
I was getting an error when the Create method is called from Organizationservice object and it is executing fine till that method. Could you please suggest me how to go further on this?
Thanks &amp; Regards, AnilHi Anil,
You want to make sure you use lower case for both CRM entity and field names.
In any case, writing a custom script component to talk to CRM may not sound terribly hard, but as soon as you get more business requirements and you deal with more entities, you will find it is not something trivial.
For this reason, we highly recommend you check out a commercial offering which will actually save you a lot of time and effort. Check out our solution at http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm/ for
further details, we offer many integration features for Microsoft Dynamics CRM you can't find elsewhere, such as Upsert, Text Lookup, many-to-many relationship support, various writing actions, etc.
Disclaimer: I work for KingswaySoft
Daniel Cai | http://danielcai.blogspot.com |
@danielcai | Data Integration made easy with
SSIS Integration Toolkit -
Hi,
Can any body tell me how to keep query related data in
internal table?
Regards,
Suresh Kumar.Do you mean that you are running a SQ01 query and you want to get the data from it into your report program?
If this is the case, the normal way that we pass internal tables and stuff from program to program, is thru IMPORT/EXPORT statements. But since you are talking about a query this may be a problem in adding the EXPORT statement to it.
Regards,
RIch Heilman -
Dynamically Populated Option Sets in CRM 2013
Hello,
In my solution, I have an entity with an option set attribute that has no option values by default. A script in the entity form handles the population of the option set dropdown via .addOption. The displayed value of the attribute shows blank or "--"
(for CRM 2013). The expected behavior is that when the user selects an item in the dropdown, the field value changes and then displays the selected value. Another attribute (single line of text) then gets that value for later use. This works just fine in CRM
2011.
However, in CRM 2013, selecting a value in the dropdown does not change the displayed value of the field. Putting focus again on the dropdown shows that the default value (blank) is selected (or nothing is selected).
I tried to modify the field value using Xrm.Page/Entity and even JQuery directly on elements to at least to display the selected text, change some attributes, etc. None of this works. It should be noted that when attaching a "change" handler in
JQuery to the dropdown, it fires. When specifying a change handler for the field in the form properties, it does not fire.
I have another idea involving creating a workflow that runs periodically or another server process/plugin to dynamically populate a global option set, and then point my entity's option set attribute to that option set. If you're wondering why a workflow,
the attribute is supposed to be a list of all existing entity names in the current default solution. If for some reason entities are added/removed from the solution, my option set needs to be brought up-to-date.
Before going down this road, I'm wondering if any of you have encountered this and how you got around it.
Thanks!Hello Mahender
As Rod mentioned in his query, the option set attribute is supposed to be a list of all existing entity names in the current CRM organization . If for some reason entities are added/removed from the organization, the option set needs to be updated.
Hence we created a blank option set attribute. Now, OnLoad of the form, we populate the option set using .addOption() method. This populates the option set, but on selection change, attribute's OnChange() is not getting triggered and also, the selected value
is not visible on form.
Below is an example of what we are trying to achieve
http://www.powerobjects.com/blog/2012/01/25/microsoft-dynamics-crm-and-dynamic-option-sets/
I hope I am able to explain my query in detail here.
Any help is appreciated.
Thanks,
Bhavika Patel -
How to show User Auditing data in dashboard/reports in MS CRM 2013 online?
HI,
I am having requirement to show user auditing details like user last logged in date/ session spent time in MS CRM 2013 online.
I did not found any option to query user Auditing data.
I found the Audit summary View but don't know how to use it.
Could any one suggest me how to achieve this.
Thanks
Baji RahamanPlease try this
Public Function Decompress(ByVal arr As Byte()) As Byte()
Dim s As Byte()
Dim notCompressed As Boolean
notCompressed = False
Dim MS As System.IO.MemoryStream
MS = New System.IO.MemoryStream()
MS.Write(arr, 0, arr.Length)
MS.Position = 0
Dim stream As System.IO.Compression.GZipStream
stream = New System.IO.Compression.GZipStream(MS, System.IO.Compression.CompressionMode.Decompress)
Dim temp As System.IO.MemoryStream
temp = New System.IO.MemoryStream()
Dim buffer As Byte() = New Byte(4096) {}
While (True)
Try
Dim read As Integer
read = stream.Read(buffer, 0, buffer.Length)
If (read <= 0) Then
Exit While
Else
temp.Write(buffer, 0, buffer.Length)
End If
Catch ex As Exception
notCompressed = True
Exit While
End Try
End While
If (notCompressed = True) Then
stream.Close()
Return temp.ToArray()
Else
Return temp.ToArray()
End If
End Function
Thanks & Regards Manoj
Maybe you are looking for
-
I need help with adobe reader can someone please tell me what to do?
I am having a problem with Adobe Reader 9.3.2 When I try to install, it begins installing, but then stops and the error messagy states "Adobe download manager is currently installing an application, Once installation is complete stop installing all
-
Hi everyone, I'm testing a feature in ESS/MSS called "Appraisals', but I´m seeing a big grey square in some of the components. If I right click on it, I have a Adobe message saying "Movie not loaded". I think this is suppose to show a Adobe Form, pre
-
is there a way to extract data from one of e.g. 7 rows from the multicolumn listbox?
-
Imac with OS X 10.9.5 needs upgrading to sync with my ios 8 devices
Imac 3.2 Ghz Intel Core 13 4 GB 1333Mhz DDR3 ATI Radeon HD 5670 512 MB\OS X 10.9.5 I cannot use icloud now with my iphone and ipad that upgraded to IOS 8.02. When I try and get the imac to upgrade, it shows none are available. HELP Jill
-
HI Sap Experts, We prepared Z Report for Cform tracking by using two tables 1.konv 2.zcform Now two fields to be added in the above report two fields are as follows 1.Total value of the cst sales 2.value of the c form received for the particular Qtr.