locked
How to use attachevent to crm default buttons RRS feed

  • Question

  • Hi all,

    i need to know ,How to use javascript attachevent to crm default buttons..

    Thanks,

     


    Natarajan.V
    Thursday, April 29, 2010 10:09 AM

Answers

  • Yes, Tanguy is right. My sample just shows the popup. You want to write back the initial function you have to use as below.

    document.getElementById('_MBConvertResponse').onclick = function()
    {
    alert("Convert Campaign Response is invoked");
    this.action=ConvertResponse();
    this.onclick=window.execScript(action);
    };

    Thanks Tanguy.

    Regards
    Vinoth

    Thursday, April 29, 2010 11:30 AM

All replies

  • Hi,

      This is not my requirments ,i need a requirement of: want to fire Onclick event for the convert campaign response button on campaign response form.

    please tell me how to follow this situation

    Thanks in advance


    Natarajan.V
    Thursday, April 29, 2010 10:30 AM
  • Campaign Response Form Onload()

    document.getElementById('_MBConvertResponse').onclick = function(){ alert("Convert Campaign Response is invoked"); };

    Regards
    Vinoth

    Thursday, April 29, 2010 11:07 AM
  • Vinoth solution is the good one

    Just do not forget to write back the initial function call if you need it, because Vinoth example just shows a popup, it does not launch anymore the normal treatment


    My blog : http://mscrmtools.blogspot.com

    All my tools on my new dedicated site: MSCRMTools Repository
    Thursday, April 29, 2010 11:11 AM
    Moderator
  • Yes, Tanguy is right. My sample just shows the popup. You want to write back the initial function you have to use as below.

    document.getElementById('_MBConvertResponse').onclick = function()
    {
    alert("Convert Campaign Response is invoked");
    this.action=ConvertResponse();
    this.onclick=window.execScript(action);
    };

    Thanks Tanguy.

    Regards
    Vinoth

    Thursday, April 29, 2010 11:30 AM
  • Hi,

    Using CRM 4.0

    I am trying to use the same code for Send Button on Email Entity. Its not working for some reason.

    Could you please help?

    Below is the code that i have written in the onload event of Email Form.

    document.getElementById('_MBSend').onclick = function()
    {
    //my code to create a note on custom entity
    this.action = Send();
    this.onclick = window.execScript(action);
    };

    Monday, March 2, 2015 7:04 PM