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
Edgar MoranEdgar Moran 

Case Custom Button javascript redirect not working.

Hi all,

We are working in our sandbox and creating a new custom Button type URL to redirect to a visualforce page I'm getting this error:
User-added image

Here's my button code:
window.location = '/apex/FinancialRequest_New'

Even I'm setting the button to use it as  URL '/apex/FinancialRequest_New' , the message is the page no longer exist, so still the same issue.

Thanks in advance.
Deepak GerianiDeepak Geriani

Hello Edgar Moran,

Use Below code for your button

{!$Site.BaseUrl} + 'apex/PageName'

mark as solved if your isssue is resolved. 

preyni sammepreyni samme
Custom button and perhaps use some merge ... Well the problem young wippersnapper was URL hacks were never officially supported...

Visit this post CiCi’s Pizza is providing its customers with an opportunity to win Free CiCi’s Pizza Coupons through CiCis Pizza Guest Loyalty Survey.