You need to sign in to do that
Don't have an account?
Alexandru Ileana
Service Cloud Console does not automatically refresh the View page on the Case object when overridden
Hello Everyone,
I have an issue with the service cloud console.
Normally when adding an attachment or adding a new comment, the Case tab will refresh, showing the modification as shown in the attachment named 'Standard and Expected behavior (no override).png'.
Later we have overridden the standard View page of the Case object with a new custom visualforce page called 'TicketPageWrapper.page' as shown in the attachment 'Case View Overriden.png'.
In order for the debugging process to be easier and to eliminate other possible causes from our side, I have eliminated all our custom scripts and left the page as simple as possible.
The code for the 'TicketPageWrapper.page' visualforce page is the following:
After repeating the process the result looks as shown in the attachment named 'Faulted behavior (after override) - no refresh.png'. The automatic refresh does not occur.
I am not sure if this can help but I have also attached the firebug console after the comment has been added in the overridden page ('Firebug output in overriden page.png').
When refreshing the houl page, the comment appears and this is actually the problem. I would like to know why this happens and have the page refresh just like it used to before.
Other similar issues include the 'hideListButton' arrows not memorising the state after closing the ticket as shown in attachment 'hideListButton issue.png'
as well as not being able to change the icon of this 'external page' which in fact is not external, using sforce.console.setTabIcon('/img/sprites/master.png');.
I was able to change the title however using: 'sforce.console.setTabTitle('Ticket #{!Case.CaseNumber}');' however.
The most important issue of all is the first one of course. The problem with the refresh.
I would like to know what can be done to bring back that functionality.
Any suggestion and information is welcome.
Thank you!
Best regards,
Alexandru.
I have an issue with the service cloud console.
Normally when adding an attachment or adding a new comment, the Case tab will refresh, showing the modification as shown in the attachment named 'Standard and Expected behavior (no override).png'.
Later we have overridden the standard View page of the Case object with a new custom visualforce page called 'TicketPageWrapper.page' as shown in the attachment 'Case View Overriden.png'.
In order for the debugging process to be easier and to eliminate other possible causes from our side, I have eliminated all our custom scripts and left the page as simple as possible.
The code for the 'TicketPageWrapper.page' visualforce page is the following:
<apex:page standardController="Case" extensions="TicketPageWrapper"> <apex:detail id="detailBlock" inlineEdit="true" relatedListHover="true" subject="{!Case.Id}" relatedList="true"/> </apex:page>
After repeating the process the result looks as shown in the attachment named 'Faulted behavior (after override) - no refresh.png'. The automatic refresh does not occur.
I am not sure if this can help but I have also attached the firebug console after the comment has been added in the overridden page ('Firebug output in overriden page.png').
When refreshing the houl page, the comment appears and this is actually the problem. I would like to know why this happens and have the page refresh just like it used to before.
Other similar issues include the 'hideListButton' arrows not memorising the state after closing the ticket as shown in attachment 'hideListButton issue.png'
as well as not being able to change the icon of this 'external page' which in fact is not external, using sforce.console.setTabIcon('/img/sprites/master.png');.
I was able to change the title however using: 'sforce.console.setTabTitle('Ticket #{!Case.CaseNumber}');' however.
The most important issue of all is the first one of course. The problem with the refresh.
I would like to know what can be done to bring back that functionality.
Any suggestion and information is welcome.
Thank you!
Best regards,
Alexandru.
I have just written a huge answer and everything got deleted because I misclicked on a link.
I will just briefly say a few words now
- Checking if the ticket was updating by comparing the initial last modified date with one obtained through javascript remoting on an action
This is the rest of the core related to console related actions. I did not explain everything, but hopefully it is enough to get a general image: Example of a custom comment object with a custom visualforce page that will be a subtab and redirect with the previously mentioned parameter in the URL via controller code:Conclusions:
- I have not used casefeed... but I imagine you are in a similar situation regardless of that tag
- The refresh trick works only by using an overriden or custom subtab page sending a url parameter to the main tab
- The main tab needs to do actions when it receives it: decide wether or not to do a simple refresh or a hard refresh by removing and readding everything possible only if you follow the order of operation in the function. Other orders can mess up your console and end up with tabs that do not appear, being unable to refresh the tab selector, tabs being closed with important information.
- You cannot reliably set an on close event on the main tab to do this. When it closes it forgets what it was doing and you will have only partial subtabs open at the end. Or none. The on close event must be done in the child tab.
- You should think about how many standard pages you want to have a refresh on the main tab and replace accordingly and readd the information with: apex:detail
- You could search for changes every 10 seconds with a script in order to find changes in the last update date, but test intensively! This will allow you to refresh even on events such as modifying the ticket team, by selecting related objects and comparing the last modified date with the last modified date of the case
- It is the only way to make this work as long as Salesforce does not realise that overridded pages are still part of the same domain (their explainaition was that the domains are firrerent between an external page and a standard one)
I hope this helps. Please let me know if you have further questions.Best Regards,
Alexandru.
All Answers
You would need to use javacript to refresh the VF after save:https://help.salesforce.com/apex/HTViewSolution?urlname=Service-Cloud-Console-overridden-case-edit-tab-refreshes-incorrectly-1327107603001&language=en_US
I have looked through these links and while I understand that having only custom visualforce pages and playing with the service console API would work just fine, in this case I am talking about the standard Case object page wrapped in a visualforce page. By doing so my original page becomes an external page and the ticket adding page as well as the new comment page appear in a subtab.
First of all I do not see how I cann add code in that subtab... It is a standard page I have no access through through code. I cannot set the focus to the parent Tab, I cannot identify the parent Tab, I cannot get the Id of the tab (where do I write that and how do I call it), I cannot write code inside the Case tab to refresh the page on focus because the tab remains in focus and most functions don't even work anyway in this case.
These commands are simply being ignored. If I hav code access in these standard pages I believe I would see something happen, but as it stands it does not work. The only thing I was able to do was change the onClick function in 'add attachment' to not use 'navigateToUrl' and instead open in a new primary tab. Not only does that tab not automatically get focus, but it is opened as an 'External page' as the title.
In short, the link provided is very general in it's explanation and only works for custom visualforce page <-> custom visualforce page relations. I would like to know if anyone has managed to make this possible and I would prefer a full visualforce page A code in the answer and full visualforce page B code if necessary.
Also I would like to know how to call a 'sforce.console....' type function from a standard subtab such as 'Ticket Comment Edit' (where I cannot write code). Perhaps that would help with the issue.
Alexandru, did you every solve your problem? We have a similar issue wrapping a case inside <support:casefeed />, and when the user adds an attachment the page doesn't refresh, and I don't see how I can get a notification an attachment is added so I can refresh it.
We tried creating a pushtopic and listening for it, but Attachment is an unsupported pushtopic. Groan.
Short of writing our own custom VF page for attachments, I'm unsure how to get around this. I'm hoping you found an answer.
I have just written a huge answer and everything got deleted because I misclicked on a link.
I will just briefly say a few words now
- Checking if the ticket was updating by comparing the initial last modified date with one obtained through javascript remoting on an action
This is the rest of the core related to console related actions. I did not explain everything, but hopefully it is enough to get a general image: Example of a custom comment object with a custom visualforce page that will be a subtab and redirect with the previously mentioned parameter in the URL via controller code:Conclusions:
- I have not used casefeed... but I imagine you are in a similar situation regardless of that tag
- The refresh trick works only by using an overriden or custom subtab page sending a url parameter to the main tab
- The main tab needs to do actions when it receives it: decide wether or not to do a simple refresh or a hard refresh by removing and readding everything possible only if you follow the order of operation in the function. Other orders can mess up your console and end up with tabs that do not appear, being unable to refresh the tab selector, tabs being closed with important information.
- You cannot reliably set an on close event on the main tab to do this. When it closes it forgets what it was doing and you will have only partial subtabs open at the end. Or none. The on close event must be done in the child tab.
- You should think about how many standard pages you want to have a refresh on the main tab and replace accordingly and readd the information with: apex:detail
- You could search for changes every 10 seconds with a script in order to find changes in the last update date, but test intensively! This will allow you to refresh even on events such as modifying the ticket team, by selecting related objects and comparing the last modified date with the last modified date of the case
- It is the only way to make this work as long as Salesforce does not realise that overridded pages are still part of the same domain (their explainaition was that the domains are firrerent between an external page and a standard one)
I hope this helps. Please let me know if you have further questions.Best Regards,
Alexandru.
Well, here's the easy answer (for us, at least).
We created a Case_History objects (our own) which is inserted into whenever a case-related object is created, deleted, or updated. The first problem this solves is we can now track all field history without any limits, and report the changes on the Case, rather than having to navigate to the child objects (like tasks, attachments, comments, etc.)
The history is created by a simply three-line trigger on the child objects.
Now that every case-related insert/delete/change is recorded inside a single object, our Case VF page can now create a PushTopic and listen for changes to the object where our case is concerned. When it receives the notification it simply re-renders <support:casefeed /> et voila.