locked
customize default button in crm 4.0 RRS feed

  • Question

  • hello all

    i want to customize save and new button in entity form like below

    so it will be look like save and close button.

    how can i do that??


    Kartik Ghodasara Associative Software engineer, Synoverge Tech Pvt. Ltd. Ahmedabad

    Tuesday, August 7, 2012 9:39 AM

Answers

  • Hi Kartik,

    Please find below code to Append Text to "Save and New" button. 

    // Function to Add "Save and New" Text to the button
    function AddSaveAndNewButtonName() { 
      var saveAndNew = document.getElementById('_MBcrmFormSubmitCrmForm59truetruefalse').childNodes[0].childNodes[0];
      var spanTag = document.createElement('span');
      spanTag.setAttribute('tabIndex','0');
      spanTag.setAttribute('class','ms-crm-MenuItem-TextRTL');
      spanTag.innerHTML = 'Save and New';
      saveAndNew.appendChild(spanTag);
    }
    // Call the Above Method
    AddSaveAndNewButtonName();

    Add the above code to your Form OnLoad event.


    Prathmesh If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful" http://patelprathmesh.blogspot.com/

    Tuesday, August 7, 2012 10:20 PM

All replies

  • Hi Kartik,

    Please find below code to Append Text to "Save and New" button. 

    // Function to Add "Save and New" Text to the button
    function AddSaveAndNewButtonName() { 
      var saveAndNew = document.getElementById('_MBcrmFormSubmitCrmForm59truetruefalse').childNodes[0].childNodes[0];
      var spanTag = document.createElement('span');
      spanTag.setAttribute('tabIndex','0');
      spanTag.setAttribute('class','ms-crm-MenuItem-TextRTL');
      spanTag.innerHTML = 'Save and New';
      saveAndNew.appendChild(spanTag);
    }
    // Call the Above Method
    AddSaveAndNewButtonName();

    Add the above code to your Form OnLoad event.


    Prathmesh If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful" http://patelprathmesh.blogspot.com/

    Tuesday, August 7, 2012 10:20 PM
  • Thanks Prathmesh.

    it's working.


    Kartik Ghodasara Associative Software engineer, Synoverge Tech Pvt. Ltd. Ahmedabad

    Wednesday, August 8, 2012 4:41 AM