MS Dynamic CRM server 2013 Email router configuration

 We have installed  CRM 2013 on premises and we need to configure email router to send receive the emails from the CRM. Also we need to integrate the outlook with the CRM 2013.
Kindly suggest..

Hi Bartosz,
Can i ask if you ever found a way forward with this...?
I think i have a similar issue with signed emails not being processed.
Many thanks
Stuart
Stuart

Similar Messages

  • Can CRM 2015 Online use the CRM 2013 Email Router?

    We are trying to plan our upgrade to CRM 2015 Online from CRM 2013 Online. We currently use the CRM 2013 Email Router and want to know if we need to upgrade the email router immediately after the CRM server is upgraded or if we could wait a short period
    of time. I searched but could not find any information on the Email Router compatibility. Does anyone have any information?

    Why are you using the email router if your Exchange Server is also Online?  Dynamics CRM Online has Server Sync built in so it will directly communicate to Exchange Online.  Much better solution than rolling up an email Router. 
    Also, if you don't have access to the Exchange server, I' doubt there's much you can do, since you don't have all the tools you need to troubleshoot the issue.
    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • How to Repair Microsoft Dynamics CRM Server 2013 once the update rollup or service pack is installed?

    Hello,
    I am going through the following Technet article:
    Repair Microsoft Dynamics CRM Server 2013 (
    https://technet.microsoft.com/en-us/library/hh699749(v=crm.6).aspx )
    The repair option asks for the original CRM DVD media location. The problem is that how the repair procedure knows about the service packs or update rollup files location?
    My concern is that the repair procedure replaced the update DLLs (or other files installed by CRM service pack installer) by the RTM files in the original setup DVD.
    Is there any special consideration for repairing Microsoft Dynamics CRM Server 2013 once the Service Pack or Update Rollup is installed?
    Thank you,

    Hello,
    I am going through the following Technet article:
    Repair Microsoft Dynamics CRM Server 2013 (
    https://technet.microsoft.com/en-us/library/hh699749(v=crm.6).aspx )
    The repair option asks for the original CRM DVD media location. The problem is that how the repair procedure knows about the service packs or update rollup files location?
    My concern is that the repair procedure replaced the update DLLs (or other files installed by CRM service pack installer) by the RTM files in the original setup DVD.
    Is there any special consideration for repairing Microsoft Dynamics CRM Server 2013 once the Service Pack or Update Rollup is installed?
    Thank you,

  • CRM 2013 Email Router Issue

    We configured email router using Office 365 Exchange Online. Followed everything as mentioned in "http://blogs.msdn.com/b/niran_belliappa/archive/2014/04/10/installing-and-configuring-the-e-mail-router-for-exchange-online-and-crm-online.aspx".
    Test access is also success. But when I tried to send email from CRM it is not working. The status is still in "Pending Send". Please suggest some solution if you aware of this issue.
    Thanks,
    Nithya

    Thanks for the response. Link was useful.  Now we are able to send mail only using the same account which we have used for Outgoing profile connection. Couldn't Identify what is the issue. PFB screenshots of the configured outgoing profile.

  • Team Foundation Server 2013 Email Alerts not working.

    Hello
    I'm trying to configure Email alerts for my TFS but whenever I do a "Send test email" I get the following error. 
    This is what the log file in the error says.
    [Info   @05:07:35.833] ====================================================================
    [Info   @05:07:35.833] Team Foundation Server Administration Log
    [Info   @05:07:35.833] Version  : 12.0.30324.0
    [Info   @05:07:35.833] DateTime : 01/27/2015 10:07:35
    [Info   @05:07:35.833] Type     : Configuration
    [Info   @05:07:35.833] Activity : Settings
    [Info   @05:07:35.833] Area     : ApplicationTier
    [Info   @05:07:35.833] User     : WIN-NOBGFM4GTAF\Administrator
    [Info   @05:07:35.833] Machine  : WIN-NOBGFM4GTAF
    [Info   @05:07:35.833] System   : Microsoft Windows NT 6.1.7601 Service Pack 1 (AMD64)
    [Info   @05:07:35.833] ====================================================================
    [Error  @05:09:20.580] 
    Exception Message: The operation has timed out (type WebException)Exception Stack Trace:    at System.Net.HttpWebRequest.GetResponse()
       at Microsoft.TeamFoundation.Admin.Console.Models.DlgSendTestMailViewModel.SendEmail()
    I've tried searching around and have found one or two other people with the same problem but haven't found a working answer.
    Nauman Abbas ICS Network Engineer

    TFS forum is here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=tfsgeneral
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Exchange Server 2013 email rejections from free ISP accoounts

    We have an Exchange 2013 box, and we are getting random mail no deliveries to mostly free email isps (gmail, hotmail, yahoo, and aol) where errors are like:
    Generating server: OPCSEX.opcs.local
    Receiving server: mailin-04.mx.aol.com (64.12.91.196)
    [email protected]
    8/31/2014 2:56:52 PM - Remote Server at mailin-04.mx.aol.com (64.12.91.196) returned '550 4.4.7 QUEUE.Expired; message expired'
    8/31/2014 1:49:53 PM - Remote Server at mailin-04.mx.aol.com (64.12.91.196) returned '451 4.4.0 Primary target IP address responded with: "554 mtaig-mcb02.mx.aol.com ESMTP not accepting connections." Attempted failover to alternate host, but that
    did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts. The last endpoint attempted was 64.12.91.196:25'
    When I research I am reading thinks like the mail record should be a cname, not a record. That dosent make sense to me. Is there a tool that can help me track down the issue, or that verifies that all my DNS records are correct?
    Thanks

    Hi,
    In your case, I recommend you create a send connector that force HELO for these problematic domains and check the result. Use the following cmdlet to create the special send connector.
    New-SendConnector -Name ForceHelo -AddressSpaces problematicdomain.com -ForceHELO $true
    Hope this can be helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • Problem after installation Project Server 2013 CU September 9, 2014

    Dear All,
    I have some problems after installation
    Project Server 2013 CU September 9, 2014 (Hotfix 2883072) on 3 level farm
    Before installing CU, I have installed
    SP1 for Project Server 2013, installation and configuration was successful.
    Then I have installed CU and I have not get any errors during installation process. Then I have restarted servers and in SharePoint health analyzer got an error about patch/installation status
    on WFE server.
    I checked in Windows installed updates and hotfix is installed. I checked in SharePoint Update and Upgrade history and there were no errors during installation. But when I checked in Manage
    Patch Status list I found an information:
    Language Pack for SharePoint and Project Server 2013 - Russian
    Microsoft Project Server Russian Language Pack 15.0.4420.1017 Installed
    Hotfix for Microsoft Project Server 2013 (KB2883072) 64-Bit Edition
    15.0.4649.1001 Missing/Required
    Microsoft Project Server 2013
    Microsoft Project Server English Language Pack 15.0.4571.1502 Installed
    Hotfix for Microsoft Project Server 2013 (KB2883072) 64-Bit Edition
    15.0.4649.1001 Missing/Required
    Service Pack 1 for Microsoft Project Server 2013 (KB2880553) 64-Bit Edition
    15.0.4571.1502 Installed
                Microsoft Project Server Web Front End Server
    15.0.4571.1502 Installed
    Hotfix for Microsoft Project Server 2013 (KB2883072) 64-Bit Edition
    15.0.4649.1001 Missing/Required
    Service Pack 1 for Microsoft Project Server 2013 (KB2880553) 64-Bit Edition
    15.0.4571.1502 Installed
    If I run installation again I get message that nothing will be updated - no update needed.
    Please help, how I can install missed packages?

    The problem was solved !
    I solve it using two ways:
    1. I have installed the hotfix for Project Server -  Hotfix for Project Server 2013 October 14, 2014 KB 2889959 (Projectserverwfe-x-none.msp, Projectservermui-Language-Code.msp)
    2. using command
    Psconfig -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures -cmd installcheck -noinstallcheck
    After two actions I was able to run SharePoint Configuration Wizard and upgrade database. Configuration completed successful.

  • Outbound mails from SAP CRM server

    Hi,
    Is there any way by which Outbound mails from SAP CRM server can be routed to more than one mail servers?
    Any suggestions or work arounds will be appreciated.
    Thanks and regards,
    Asheesh

    Hello Asheesh,
    it is possible to create more than one Mail Node in Transaction SCOT. The mail can then be routed depending on the Domain Name.
    Regards
    Gregor

  • Outlook 2007 compatiable with Exchange server 2013

    Hi
    I would like to ask, i have outlook 2007 and Exchange server 2013, when i configure outlook 2007, i fail to configuration, Is it outlook 2007 compaitable to exchange server 2013.

    Yes, Outlook 2007 is supported. Make sure that the Outlook 2007 clients are fully updated. As a minimum, you need
    SP3 for office 2007,
    kb2687404 and
    kb2768023.
    Again, the best approach is to have all office 2007 updates installed.
    Step by Step Screencasts and Video Tutorials

  • CRM Email Router & Email Configuration

    Hi All,
    I have some question related email router & email configuration in MS CRM 2015. I test using gmail account for both CRM email and contact email (different gmail account).
    1. I try send from my gmail to CRM directly, the result is the email not received in CRM. but if I try from CRM to my gmail using email activities first, after email received in my gmail inbox and reply back the email, I have received new email activities
    in CRM. my question is why the email not received if I try to send directly?
    2. what is email server profile use for? is there any article/link is easy to understand?
    thanks.

    hi Erro,
    why I asked is to check if email router machine account is added into the priv user group.
    http://msdn.microsoft.com/en-us/library/hh550195(v=crm.6).aspx
    regards
    Jithesh

  • 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.
    - Mittal

    Hello,
    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.

  • Email Router Not Configured after IFD Installation on CRM2013 Server

    After implementation of IFD on CRM2013 Server when we configure the Email Router the token service error will show during load the data in Email Router.
    Kindly help me to resolve this issue
    Thanks & Regards,
    Mohit Sharma
    email: [email protected]

    Hi Upen,
    Thanks for your response. It is a 64 bit machine and the setup is also 64 bit.
    I would like to mention some points related to my deployment scenario:
    We have a Windows server 2008 R2 Standard edition on Server machine.
    I have a .net website appliaction deployed and running on this.
    One of our third party vendor is developing Cold fusion application.
    This Cold fusion application will be integrated in our .net website.
    Deployment and configuration of Cold Fusion application and server wil be done by Third Party vendor.
    I need to install Cold fusion and give access to Third party.
    Issue when I install cold Fusion using default settings, my .net Website does not get loaded.
    In Mozila and Chrome Browser I get blank Page with only Background image given in Body tab of page is getting displayed.
    In IE Browser Page with background image given in Body tab of plus this text ' <script> src="" 'is getting displayed.
    Regards,
    Sarfaraj Shaikh

  • Configuring Multiple domain Email addresses in Exchange server 2013 for Send/Receive

    I've setup an exchange server 2013 , I have an requirement to setup email addresses for multiple domain account.
    For example - My primary email addresses - [email protected] however i need to setup multiple domain email account for single AD user.
    Example
    [email protected]
    [email protected]
    [email protected]
    I was able to setup account to receive email from different users to single mailbox users however how can i send mails from other domains email address apart from primary domain email 
    Thank you
    Benhur

    Hello,
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.
    Cara Chen
    TechNet Community Support

  • Project Server 2013 and email notifications

    Hi,
    Newbie's question: is it possible to set email notifications in Project Server 2013 without Exchange Server, just with gmail or hotmail? 
    Is there somewhere a document for that?
    Thanks

    Hi Robert,
    Here is the
    documentation for configuring email notifications. I might be wrong and it has to be tested but the destination email could be any email address, you just have to enter a gmail or hotmail address in the resource
    email field.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Send email is not working in share point desinger 2013 for project server 2013 workflow

    Hi,
      How to configure email for project server 2013. i have created workflow where i am sending email. It is not sending it.
     i have set outgoing mail setting. Tasks are created in my workflow but mail is not sending.
    Thank you for helping us.
    Thank You
    Vinay

    Hi,
      How to configure email for project server 2013. i have created workflow where i am sending email. It is not sending it.
     i have set outgoing mail setting. Tasks are created in my workflow but mail is not sending.
    Thank you for helping us.
    Thank You
    Vinay

Maybe you are looking for

  • Photosmart C8100 operating system Windows 7 - no error message - no changes

    Paper comes out with folded upper right corner. Happens about 99% of the time.  Using H/P paper - both ink jet paper and premium photo with same results Have followed video directions provided by H/P - no change Have cleaned inside as much as possibl

  • DRQ: Allow choosing correct Business Partner bank account in Payment Wizard

    Hello, This is a DRQ about the Payment process. It concerns the "Payment Wizard" functionality (Menu "Banking --> Payment Wizard") and the "manual outgoing payments" creation (Menu "Banking --> Outgoing Payment --> Outgoing payment"). Version : 2007A

  • Why can't I get some of my music to sync?

    I had an iPhone 4S, I attempted to change the password to my Apple ID, something went wrong (I don't know what?!) and I couldn't reset the password as I'd lost access to my registered email address. I registered a new apple ID and all was well till I

  • HT4623 iOS7.0.2 download problem

    Hi. I tried to download iOS7.0.2 on my iphone 5, but after several hours, it is frozen. the screen shows the iTunes logo with an image of the plug and an up-arrow. I tried to reboot several times and unplug, but nothing happens.  any suggestions?  Th

  • Multi Cam View

    Perhaps someone can explain what is happening... I have a 2 camera edit.... Both cameras are synced on timeline.  I dragged them into a new sequence - enabled multi cam and then opened the multi cam monitor. When I right click on timeline video, I se