The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Refresh mainview from tab with entity model update
Posted: 09 Jun 09 2:32 PM
|
I have a quickform tab off opportunities with a button on it. When the button is clicked two fields are updated through the entity model and a C# code snip. The fields are shown both on the tab screen and the opp detail. The fields on the tab update when the button is clicked, the fields on the opp detail don't until it is refreshed manually (scroll, hit the reload button on the toolbar, f5). Is it possible to force this refresh from some C# code in the tab quickform? Thanks |
|
|
|
Re: Refresh mainview from tab with entity model update
Posted: 09 Jun 09 3:32 PM
|
Steve:
This is from a similar thread that Ryan answered:
>> As far as programatically reloading an entity, you could just do a Response.Redirect to navigate back to the same >> page they are on, basically reloading the page. I have done this several times and it has worked for me, but I believe that there are some issues with issuing a redirect sometimes.
|
|
|
|
Re: Refresh mainview from tab with entity model update
Posted: 10 Jun 09 7:49 AM
|
Thanks Raul. That works for this issue. I have another redirect question I would like to pose. I have a datagrid at the account level that displays certain opportunities - there is a hyperlink field to the opportunities but I can't seem to get the path right here..
here is the code for the hyperlink column redirect: DataNavigateUrlFields="opportunityid" DataNavigateUrlFormatString="/slxclient2/opportunity.aspx?entityid={0}"
I have tried "opportunity.aspx?entityid={0}" , "/opportunity.aspx?entityid={0}" , "../opportunity.aspx?entityid={0}" - the only one that will point to the correct place is "/slxclient2/opportunity.aspx?entityid={0}"
Is there a way to point this hyperlink column to the correct place without hardcoding in the 'slxclient2' part? Thanks |
|
|
| |
| |
|
Re: Refresh mainview from tab with entity model update
Posted: 10 Jun 09 8:54 AM
|
The tilde! Forgot about that one. That might have worked - The forum cropped my previous post - I just took the Template field/ SLX Pagelink column from the AccountOpportunities grid and modified it for my own purposes. |
|
|
|
Re: Refresh mainview from tab with entity model update
Posted: 11 Jun 09 5:24 PM
|
To avoid the redirect there is also a component called PanelRefresh available in smart parts: PanelRefresh.RefreshMainWorkspace();
From within a code snippet you can do: IPanelRefreshService refresh = form.WorkItem.Services.Get<IPanelRefreshService>(); if (refresh != null) refresh.RefreshMainWorkspace();
It's undocumented, of course, but what isn't. |
|
|
|