locked
Access crm page from silverlight RRS feed

  • Question

  • hi frnds ,

     i have used to save my crm form from silverlight by the below C# code

    dynamicparentWindow = HtmlPage.Window.GetProperty("dialogArguments");

    parentWindow.Xrm.Page.data.entity.save();

    its working fine...but i need a code to reload or refresh the page in silvelight..Can any one give me the solution as soon as possible... Thanx in advance...


    Arun Kumar G

    Thursday, July 18, 2013 7:21 AM

All replies

  • Hi,

    Does location.reload not work?

    parentWindow.location.reload()

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, July 18, 2013 7:32 AM
    Answerer
  • If parentWindow.Xrm.Page.data.entity.save(); works fine then page automatically get reload so that time your page will get reload.

    If not simply try parentWindow.locatin.relaod(false);

    Hope this helps.

    Thursday, July 18, 2013 7:36 AM
  • Hi, i have tried both

    parentWindow.location.relaod(false);

    parentWindow.location.relaod();

    but no changes in my form. The reason for reloading the crm form is to minimise the calling of both onSave and onLoad functions. Please help on this..


    Arun Kumar G

    Thursday, July 18, 2013 10:56 AM
  • Hi,

    There is a typo in the code you've posted - relaod - should be reload.


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, July 18, 2013 11:07 AM
    Answerer
  • Hi Arun,

    Are you using window.showmodaldialog or you are using window.open to display the silverlight xap?

    If you are using window.open the following code will work.I have tested it.But if you are using modaldialog ia m not sure if it will work.But you can give it a try.

     HtmlWindow parentWindow = HtmlPage.Window.GetProperty("opener") as HtmlWindow;
     ((ScriptObject)parentWindow.GetProperty("location")).Invoke("reload", true);


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

    Thursday, July 18, 2013 12:30 PM