Revert back JavaScript code after plugin execution error RRS feed

  • Question

  • I have created a custom entity in Microsoft Dynamics CRM 2013 On-premise environment. I have inserted an HTML web resource on the entity form and the web resource contains a dynamic pick-list control.

    I have written JavaScript code to disable the pick-list control on save of the custom entity. I have also written Plugin code to on create of the custom entity.

    I don't want to disable the pick-list control if the plugin throws an error message.

    Is there any way to achieve this?

    Friday, February 13, 2015 9:56 AM

All replies

  • Hi,

           The way to go will be to call the save from script and if server throws an exception, handle it in java script. Use the method


          If you rely on user clicking on save button, then there is no way to force this.

    Hope this helps.
     Minal Dahiya
     blog : http://minaldahiya.blogspot.com.au/

     If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"


    Monday, February 16, 2015 2:05 AM