function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EJN5007EJN5007 

Service Cloud Standard Object VIEW/NEW issue

I am having a small issue in my service cloud app. I was wondering if anyone else has experienced this issue in the past.

 

APP Architecture: All standard objects. I have replaced the standard objects VIEW and NEW page references with custom VF.

 

Steps to recreate error:

  1. Create new record on standard NEW page -- custom VF page
  2. Click save - default {!save}
  3. DML success record relocates to standard VIEW -- custom VF page
  4.  "refresh" browser on detail page
  • page now relocates to a new standard NEW page with all empty fields

This is a major problem for me as it drastically affects my user experience. I thought about creating an action on my detail page <apex:page> which refreshed the page (again). This has not been tested yet.

 

I first noticed the issue when speeding through my app as it has a semi "wizard" feel and I noticed I was occasionally getting kicked back to blank NEW pages.

 

your thoughts?

Best Answer chosen by EJN5007
EJN5007EJN5007
Thank you Izay. I found out the issue has something to do with the console.

The consoles built-in navigation is pretty good but can be buggy in some ways. I had to manually fix it by pointing it manually via the console tool kit:

Posted the code just incase anybody else has the same issue.

<script type="text/javascript">
        function OpenDecA() {
            sforce.console.getEnclosingPrimaryTabId(OpenDecB);
        }
        var OpenDecB = function OpenDecB(result) {
            var tabId = result.id;
            sforce.console.openPrimaryTab(tabId , 'https://na15.salesforce.com/apex/decision_view?id={!decision.id}', true, '{!Complaint__c.name}', null, null);
        };
    </script>

All Answers

izayizay
Hi, When the record is created and the user is redirected to the view page, make sure that the PageReference redirect property is set to true. This should fix your problem. Ex. PageReference pr = new PageReference('/'+record.Id); pr.setRedirect(true); return pr; Hope this helps!
EJN5007EJN5007
Thank you Izay. I found out the issue has something to do with the console.

The consoles built-in navigation is pretty good but can be buggy in some ways. I had to manually fix it by pointing it manually via the console tool kit:

Posted the code just incase anybody else has the same issue.

<script type="text/javascript">
        function OpenDecA() {
            sforce.console.getEnclosingPrimaryTabId(OpenDecB);
        }
        var OpenDecB = function OpenDecB(result) {
            var tabId = result.id;
            sforce.console.openPrimaryTab(tabId , 'https://na15.salesforce.com/apex/decision_view?id={!decision.id}', true, '{!Complaint__c.name}', null, null);
        };
    </script>
This was selected as the best answer