How to refresh a single field in a form RRS feed

  • Question

  • I have two entities. Parent and child.

    when Child entity is updated and saved, I need one of the field in Parent form to know that a change in the child form has happened. So how can I refresh that particular field?

    If using JS, please suggest an example of how to do it..

    I tried looking different examples but not found a solution.


    Thursday, September 4, 2014 6:25 PM

All replies

  • Depending on what you want to do, a workflow might do it.  If the field on the form just need to be changed to a set value, you could have the change of that record on the child record update the field on the parent form. However, that won't work if you're calculating that field from the child records (e.g. aggregate value of opportunities on an Account) without creating a custom workflow step. JavaScript that runs OnSave of the child record will also do, but only if a user working on a form is the ONLY way the child record gets updated.  If anyone ever does bulk updates, updates from workflow, etc., that JS won't run.

    The only 100% reliable method that covers all scenarios is to use a plugin that executes when you save a child record.  Then it will get executed no matter how the child record is updated.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    Thursday, September 4, 2014 7:51 PM
  • I actually want to refresh the parent form on child form save.

    Can I call some function on Child form OnSave to refresh the parent form using javascript.

    If so, what is the script that should be used?


    Thursday, September 4, 2014 8:11 PM
  • Since crm uses event driven method, you do not have a direct solution to your problem.

    what you want is child form triggering event on parent form.

    if you have an option to enable auto save, crm will refresh the form automatically every 30 seconds and synchronize updated records.

    another option is to add a JavaScript timer function on parent form to query child records every 30 second or so. If the child record has changed, you could update the current record.



    Thursday, September 4, 2014 9:08 PM