locked
Field fire on change is triggering when we update the field in plugin. how can we supress thid on chnage trigger? RRS feed

  • Question

  • Hi Team,

    We have written a validation java script code in on change of the specific field. But we are updating this field on update of the entity using plugin code. we observe that on java script on change function is firing , when we update the field from  plugin also.

    Can we stop this particular on change event from plugin update?

    thanks in advance.


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

    Thursday, June 11, 2015 11:05 AM

All replies

  • If no one has a better idea you could create a new boolean field on your form that is hidden, everytime your javascript runs it would update that field to true, then in your plugin you can check that field before doing your normal functions, if the field is set in the plugin event you just reset the field to false and exit the plugin, if it is not setin the plugin event you just carry on as normal and have the plugin do its function.

    Or you could check the pre and post images against each other to determine if just that field was changed (without knowing more about your code I cannot say if that would work.).

    Hope this helps in some way.


    Halldór Jóhannsson



    Thursday, June 11, 2015 12:44 PM
  • Hi Hari,

    As far as i know, Plugin is a server side and Javascript is a Client side code. There is no way in which both can communicate as you have mentioned. Dont think an update from a plugin which is server side code can cause a javascript to fire untill and unless you do some activity like refreshing the page or something on the client side. Can you give some additional info on when your javascript fires.

    Hope this helps!!!

    Thanks,

    Prasad

    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, June 15, 2015 4:57 AM