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
LloydSLloydS 

VisualForce Page Suddenly Stopped Working

I have a simple VF page that is used to override the default view when clicking on the Cases tab. I've been using it form months but then it stopped working this morning. No error messages. No data. It just displays the "waiting to load" message. It doesn't appear to be trying to do anything and the browser indicates that the page has completed loading.

 

Any idea?

 

 

<apex:Page tabStyle="Case" >
<script src="/soap/ajax/15.0/connection.js"></script>
<script type="text/javascript" />
<script>
     window.onload = function() {

     sforce.connection.sessionId = '{!$Api.Session_ID}';

     var describeSObjectResult = sforce.connection.describeSObject("case");
     var prefix = describeSObjectResult.keyPrefix;

     var cView = "00BA0000003Nxh5";

     // Change the whole window to point to this location
     parent.document.location.href = "/" + prefix + "?fcf=" + cView ;
}
</script>
<center><h2>Please Wait ..... Loading Open Requests</h2></center>
</apex:page>

 

 

Best Answer chosen by Admin (Salesforce Developers) 
SteveBowerSteveBower

Hi, I'm not sure what to tell you.  This exact code works for me.

 

 

<apex:page action="{!urlfor('/500?fcf=00BR00000015fY7')}"/>

 

Best, Steve.

 

All Answers

ScoobieScoobie

Have you checked that this isn't related to the Summer 10 upgrade?

SargeSarge

Hi,

 

   I think this might be an browser issue. The onload event might not be firing as expected. Just include an alert in your JS code and find out whether JS is working or not.

 

Cheers..

LloydSLloydS

I don't think it's a browser issue as it's affecting everyone and on both FF and IE.

 

As for Summer '10, it was working when we initially got updated. Of course, SFDC could have rolled out something subsequently which caused it to break. Not sure how to confirm that though.

d3developerd3developer

I also have a page which suddenly stopped working.. I now simply get an "Authorization Required" message with no entry in the debug log when I go to the page on Sites. The internal version works fine.

LloydSLloydS
Still looking for resolution to this if anybody has any suggestions. Unfortunately I'm not even sure how to troubleshoot this. I'm not seeing any error messages (at least displayed). And it is happening across browsers and amongs every user.
d3developerd3developer

In my non working pages / controllers I was able to eventually find a line that caused it all to break.

SteveBowerSteveBower

Hi, I'm not sure why your code isn't working, but might I opine that, unless I'm missing something, this is a sort of outdated way to achieve this.

 

All you're trying to do here is to redirect the user to  "/500?fcf=00BA0000003Nxh5" when the VF page loads.

 

Why not write a VF page that does exactly that?  It's just one line:

 

 

<apex:page action="{Iurlfor('/500?fcf=00BA0000003Nxh5')}">

 

You might argue that you don't want to hardcode the prefix (because that's what most of your current page is doing), however I'd point out that if you're hardcoding the ID of the viewlist, there's no reason not to do the whole thing.

 

Best, Steve.

 

 

LloydSLloydS

I presume there needs to be a "/" preceding the final ">".

 

When I try that I get a message:

 

Illegal view ID {Iurlfor(/500?fcf=00BA0000003Nxh5)}. The ID must begin with /

SteveBowerSteveBower

Hi, I'm not sure what to tell you.  This exact code works for me.

 

 

<apex:page action="{!urlfor('/500?fcf=00BR00000015fY7')}"/>

 

Best, Steve.

 

This was selected as the best answer
LloydSLloydS

Yep that worked. There was a typo in your first example (I instead of !).

 

Thanks.