Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011: Change sender when replying emails generates drafts in IE9 but not in IE7

$
0
0

Hi!

I need some help:-)

We are changing the email sender on reply. The funny thing is that our solution works perfect with IE8(XP) and IE7(win7), but are "failing" with IE9(win7). The CRM server is untouched, the clients browsers are to be upgraded tol IE9(win7).

What do I mean by failing; the user press reply and the sender is changed(by javascript) and after the email is sent there is an additional draft with the previous sender. That means the user have to delete the draft...

Here's our javascript Form_onload function:

function Form_onload() {

    var KUNDESERVICE_QUEUEID = '{7740F2FF-4826-43F3-9EAA-F5E0D84C0D9C}';

    var FORM_TYPE_CREATE = 1;
    var FORM_TYPE_UPDATE = 2;
    var FORM_TYPE_READ_ONLY = 3;
    var FORM_TYPE_DISABLED = 4;
    var FORM_TYPE_QUICK_CREATE = 5;
    var FORM_TYPE_BULK_EDIT = 6;

    var CRM_STATUSCODE_DRAFT = "1";
    var CRM_STATUSCODE_COMPLETED = "2";
    var CRM_STATUSCODE_SENT = "3";
    var CRM_STATUSCODE_RECEIVED = "4";
    var CRM_STATUSCODE_PENDING_SEND = "6";
    var CRM_STATUSCODE_SENDING = "7";
    var CRM_STATUSCODE_FAILED = "8";

    try {
        setNettpostkasseLabel();

        var formType = Xrm.Page.ui.getFormType();

        if (formType == FORM_TYPE_CREATE) {
            // new email.
            writeOutSignature();
            setFromAddress();
            crmForm.all.subject.SetFocus();

        }
        else if (formType == FORM_TYPE_UPDATE && Xrm.Page.getAttribute("statuscode").getValue() == CRM_STATUSCODE_DRAFT && isEmailDraftJustCreated()) {
            // reply to email.
            setFromAddress();
            setTimeout(writeOutSignature, 250);
        }
    }
    catch (err) { alert(err.message); }

    function isEmailDraftJustCreated() {
        return (isForward == true || isReply == true || isReplyAll == true);
        //return typeof _deleteActionEnabled == "undefined" || (isForward == true || isReply == true || isReplyAll == true);
    }

BR Knut Myre


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>