locked
On change is calling after saving the record. RRS feed

  • Question

  • How to restrict the Onchange event to not trigger on saving of the form 
    Wednesday, October 22, 2014 7:27 AM

Answers

  •  I found the issue since fields values are changing after saving , on change event is calling. 
    • Marked as answer by shiva_prasad Tuesday, October 28, 2014 6:19 AM
    Friday, October 24, 2014 4:33 AM

All replies

  • Hi Shiva,

    How did you define the OnChange event?

    I created a javascript function for a field on change event:

    Test.Internal.Project.TestDescriptionChanged = function () {
        alert('Description Changed!')
    };

    It will not be triggered on saving the form.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 22, 2014 8:19 AM
  • Hi,

    Please make sure you are not calling same function from save event.

    Also check the code there should not be any code that add's dynamic handler for field using addOnChange method.

    http://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_addOnChange 

    Thanks!

    Wednesday, October 22, 2014 9:19 AM
  • Please provide information how you are calling your onchange function normally it won't be called on save unless you will call your method on change of fields like createdon or modifiedon in MS CRM 2013.

    Microsoft Dynamics CRM Training|Our Blog | Follow US | Our Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Wednesday, October 22, 2014 3:50 PM
    Moderator
  •  I found the issue since fields values are changing after saving , on change event is calling. 
    • Marked as answer by shiva_prasad Tuesday, October 28, 2014 6:19 AM
    Friday, October 24, 2014 4:33 AM
  • Thanks mahendar pal i got solution for this.
    Tuesday, October 28, 2014 5:21 AM