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
AmphitriteAmphitrite 

OnClick Custom Button call VF error 'URL No Longer Exists'

I'm trying to call a VF page from my custom button OnClick. But getting the error 'URL no longer exists'. Any suggestions?

 

 

{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")} 
var records = {!GETRECORDIDS($ObjectType.Case)}; 
var newRecords = []; 
if (records[0] == null) 

alert("Please select at least one row") 

else 

for (var n in records) { 
var c = new sforce.SObject("Case"); 
c.id = records[n]; 
c.XLS05__c =1; 
newRecords.push(c); 

result = sforce.connection.update(newRecords); 
window.location = '/Apex/CaseCollider'; 
}

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Its the capital 'A' in 'Apex' - change this line of code:

 

window.location = '/Apex/CaseCollider'; 

to 

 

window.location = '/apex/CaseCollider'; 

 the apex page names are case-agnostic, but the directory obviously isn't.