Hi

I have a button that invokes an aspx page which updates some object
(say some attribute of a quote or account).I've used the Update
function in the SDK and display a message that the update has been
successful.There is no problem until this part.


Now, Is there a way for this change to be automatically cascaded in
the view page? or Is there some other way to refresh the pages or
close the current window etc and reload it again?



Thanks.

Vidya

Re: Refreshing a view after Update by John

John
Tue Jul 13 22:19:26 CDT 2004

I assume you would like to do this in a similar way to the recalculate
button. The Microsoft MBS site has a piece of javascript to do this.

here is the code

function window.onunload()
{
window.opener.location.reload();
window.close();
}
--
John O'Donnell
Microsoft CRM MVP


"Veejay" <vidyajay@gmail.com> wrote in message
news:a183175a.0407130525.2e3c012f@posting.google.com...
> Hi
>
> I have a button that invokes an aspx page which updates some object
> (say some attribute of a quote or account).I've used the Update
> function in the SDK and display a message that the update has been
> successful.There is no problem until this part.
>
>
> Now, Is there a way for this change to be automatically cascaded in
> the view page? or Is there some other way to refresh the pages or
> close the current window etc and reload it again?
>
>
>
> Thanks.
>
> Vidya



Re: Refreshing a view after Update by vidyajay

vidyajay
Wed Jul 14 09:49:12 CDT 2004

Thank you.I saw this in the mbs site and used this.
However this would only refresh a view one previous level of detail.

My question was how to make this cascade to the next level.
For instance in this case the grid container would not refresh but
then that can be done by placing similar code into the aspx files in
the SFO - unsupported?


Vidya



> I assume you would like to do this in a similar way to the recalculate
> button. The Microsoft MBS site has a piece of javascript to do this.
>
> here is the code
>
> function window.onunload()
> {
> window.opener.location.reload();
> window.close();
> }
> --
> John O'Donnell
> Microsoft CRM MVP
>
>
> "Veejay" <vidyajay@gmail.com> wrote in message
> news:a183175a.0407130525.2e3c012f@posting.google.com...
> > Hi
> >
> > I have a button that invokes an aspx page which updates some object
> > (say some attribute of a quote or account).I've used the Update
> > function in the SDK and display a message that the update has been
> > successful.There is no problem until this part.
> >
> >
> > Now, Is there a way for this change to be automatically cascaded in
> > the view page? or Is there some other way to refresh the pages or
> > close the current window etc and reload it again?
> >
> >
> >
> > Thanks.
> >
> > Vidya

Re: Refreshing a view after Update by ed_mueller75

ed_mueller75
Wed Jul 14 14:23:55 CDT 2004

Hello,

> My question was how to make this cascade to the next level.
> For instance in this case the grid container would not refresh but
> then that can be done by placing similar code into the aspx files in
> the SFO - unsupported?

That should work, but as you know, this is not supported.

@John:

> >
> > function window.onunload()
> > {
> > window.opener.location.reload();
> > window.close();
> > }

This works fine with Internet Explorer. But if you use this in
SFO-Client it will fail. I think it´s because SFO works with localhost
reference. Any sugesstions how to get this work in SFO ?

Re: Refreshing a view after Update by Stephen

Stephen
Thu Jul 22 10:00:46 CDT 2004

Hi Veejay,

I'm pretty sure that this will be what you want:

function window.onunload()
{
window.opener.crmForm.SubmitCrmForm( 1, true, true, false );
}

This causes the underlying form to save and the refresh. If you just want
it to refresh (discarding any changes that you may have made) then use:

function window.onunload()
{
window.opener.crmForm.SubmitCrmForm( 4, true, true, false );
}

I used the code below from ASP.NET to only create the JavaScript snippet if
the user had clicked "Save" on my ASP page:

string ClientSaveScript = "<script language='javascript'>" +
"function window.onunload() {window.opener.crmForm.SubmitCrmForm(
1, true, true, false ); }" +
"</script>";

Page.RegisterClientScriptBlock("ClientSaveScript", ClientSaveScript);

I hope that helps.


Stephen


"Veejay" <vidyajay@gmail.com> wrote in message
news:a183175a.0407130525.2e3c012f@posting.google.com...
> Hi
>
> I have a button that invokes an aspx page which updates some object
> (say some attribute of a quote or account).I've used the Update
> function in the SDK and display a message that the update has been
> successful.There is no problem until this part.
>
>
> Now, Is there a way for this change to be automatically cascaded in
> the view page? or Is there some other way to refresh the pages or
> close the current window etc and reload it again?
>
>
>
> Thanks.
>
> Vidya