locked
Refresh a View (Current View) by Java Script in Homepage RRS feed

  • Question

  • I have created a custom button in Homepage of a Custom Entity. on clicking the button a JavaScript function fires

    i want to refresh my current view at the end of the function but i don't know how !

    is there any way to do it ?

    Monday, November 16, 2015 12:25 PM

Answers

All replies

  • Hi,

    Try below line,

    Xrm.Page.data.refresh(false);

    Regards,

    Gopinath.

    http://mscrmtechie.blogspot.in/

    Monday, November 16, 2015 12:31 PM
  • Hi

    No! it does not work

    Error: Unable to get property 'refresh' of undefined or null reference

    it seems that this command works in a Form not on the Homepage!

    Monday, November 16, 2015 12:48 PM
  • Monday, November 16, 2015 12:55 PM
    Moderator
  • Hi

    this does not work either

    'grid' is undefined

    Monday, November 16, 2015 1:05 PM
  • Hi

    this does not work either

    'grid' is undefined


    Have you attentively read an article and passed grid parameter to function you call as it described in article?

    Dynamics CRM MVP
    My blog

    Monday, November 16, 2015 1:08 PM
    Moderator
  • well, this is exactly my problem and lack of knowledge !

    I've read the article (and Microsoft's documents) but i don't know how to get the elements and pass them to jscript funtions from a HOMEPAGE grid (not a FROM grid)

    so I'm stuck !

    oh! and by the way, I'm on CRM 2015 (Forgot to mention on the main question!)

    Monday, November 16, 2015 1:13 PM
  • In case you will use mentioned tool (Ribbon Workbench) and do everything that was mentioned (using description and screenshots) your code will work. I teested this approach and it still works for CRM 2013/2015. So good luck.

    Dynamics CRM MVP
    My blog

    Monday, November 16, 2015 1:16 PM
    Moderator
  • Hi!

    Thanks! It worked!

    Although it was a very painful job as I did not want to work with Ribbon Workbench and my scenario was very complex! and these kind of thing are not meant to be followed blindly and knowing the actual logic behind it is essential to extending the example to the desired scenario, so it toke me a couple of hours to understand it and use it to my own benefit!

    So! Thanks again!

    Tuesday, November 17, 2015 10:53 AM