+ Start a Discussion
Anshul GoyalAnshul Goyal 

auto refresh a detail page using javascript in the Agent Console

The page gets redirect to the standard view when I am trying to refresh a account record detail page in the Agent Console using the following javascript code(js written in a page which is bind in a section on the standard detail page).

var currentURL =  "/{!Account.Id}"; 
top.location.href = currentURL;

As the top url is "https://cs7.salesforce.com/ui/desktop/DesktopPage" so i am trying with the following js code
parent.location.href = "/{!Account.Id}?srPos=0&srKp=001";

But i am getting the following error message:-

"Unsafe JavaScript attempt to initiate navigation for frame with URL 'https://cs7.salesforce.com/001M000000fp1k2?srPos=0&srKp=001&isdtp=mn' from frame with URL 'https://c.cs7.visual.force.com/servlet/servlet.Integration?lid=066C0000000QSDM&ic=1&isdtp=mn'. The frame attempting navigation is neither same-origin with the target, nor is it the target's parent or opener."

Can anybody tell me to auto refresh a detail page using javascript in the Agent Console.

Jerome LusinchiJerome Lusinchi
Hi Anshul,

what you could do is create a custom console component, associated with a visualforce.
then use Javascript and console methods to refresh your tabs.
check the following links :