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
Bikash.bhusalBikash.bhusal 

Redirect to a visualforce page from inside Case- Button, Links and Action

I am trying to use the URLFOR to redirect user to a page called Tech_Calendar. I tried setting it as a Visualforce page inside the content source but I do not see the tech_calendar page as one of the options. So, i am trying to make it work using URLFOR. Any help will be greatly appreciated. The code I have right now that's not working is:

 

{!URLFOR($Action.Case.Tech_Calendar, null,
[
title = 'Tech Calendar',
retURL = Opportunity.Id ,
tsk2 = Opportunity.Primary_Contact__c,
tsk5= 'Tech Calendar',
followup=1,
what_id= Opportunity.Id,
who_id= Opportunity.AccountId
])}

sfdcfoxsfdcfox
  • This button would only work on an opportunity, not a case, because you're referencing opportunity merge fields.
  • who_id can't be an account ID, it must be a contact ID.
  • The action you meant to use is most likely $Action.Activity.LogCall.
  • To use Visualforce, you'd have a Visualforce page set the standardController to the object where the button or link resides-- you'd be writing code.