+ Start a Discussion
Marco ChoinièreMarco Choinière 

Refresh service console list

Hello,

I have added a custom button in the case detail view that sets certain fields (like status to closed). I can close this tab also automatically. However, the main service console list doesn't refresh (the case is still on the old status). If I manually refresh the list (hit the refresh button), the updated data displays. How can I automatically refresh the main service console list ? I'm not using a VF page, only a custom button on the case detail view.

Thanks.

Marco.
Best Answer chosen by Marco Choinière
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Try to refresh the window not just the tab and then close the case detail page tab. When you refresh the window, it refreshes all the tabs so list view will be refreshed automatically.

All Answers

SalesFORCE_enFORCErSalesFORCE_enFORCEr
If you are using integration toolkit then you can use methods like refreshPrimaryTabByName() or refreshPrimaryTabById() in your custom button javascript.
Link to the toolkit:
https://resources.docs.salesforce.com/206/latest/en-us/sfdc/pdf/api_console.pdf
Marco ChoinièreMarco Choinière
Hello,

I have tried using that however it refreshes the tab I'm in, not the console list view. I figured that the primary tab is the one with the case number in it. Unfortunately, that's not the one I'm trying to refresh. Maybe I missed something ?

Thanks.

Marco.
SalesFORCE_enFORCErSalesFORCE_enFORCEr
What happens if you use refreshPrimaryTabById() and give the Id of the list view tab?
Marco ChoinièreMarco Choinière
Hi,

I hard-coded the id (something like ext-comp-1004) but it didn't refresh the tab. Any other ideas ?

Thanks.

Marco.
SalesFORCE_enFORCErSalesFORCE_enFORCEr
What if after you close the tab, you force the window to refresh. That will refresh the list view automatically.
Marco ChoinièreMarco Choinière
Hi, I can’t refresh the windows after the tab is closed since the code is running from the tab I’m closing. Thanks. Marco
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Try to refresh the window not just the tab and then close the case detail page tab. When you refresh the window, it refreshes all the tabs so list view will be refreshed automatically.
This was selected as the best answer
Marco ChoinièreMarco Choinière
Hi, I didn’t think of doing it that way. Will try. Thanks ! Marco.
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Sure. Let me know if it works. Also, don't forget to mark a comment as Best Answer so that others will get benefited.
Marco ChoinièreMarco Choinière
Hi,

I tried what you said. It actually worked ! I used parent.location.reload() to get the full page to reload. The funny thing is that after the reload I have the code to close the tab I'm working in. I would of  thought that it wouldn't close since it's doing the refresh. However the code execute so fast that it has the time to close the tab before the reload takes place. Not sure if it will close 100% of the time but it looks good !

Thanks for the tips !