0

Problem: I want to override the Case tab with a Visualforce page , but send Users who click a Visualforce page Tab "Case List Views" to the standard Salesforce.com Case home page.

My problem is similar to the one presented here:

http://developer.force.com/cookbook/recipe/overriding-a-page-for-some-but-not-all-users

Here's my code for my visualforce page:

<apex:page action="{if(!$CurrentPage.parameters.CaseListViews != 'yes' ,    null,urlFor($Action.Case.Tab , $ObjectType.Case , null, true))}" >


<apex:enhancedList listId="00B80000008pq6U" height="600" customizable="false" rowsPerPage="25"/>

</apex:page>

I keep getting a "Formula Expression is required on the action attributes." error.

So, I have a couple of issues here:

1) why am I getting the Formula Expression error, and how do I avoid it?

2) Am I correctly passing a parameter from a Visualforce Tab? Here's the code for my page:

<apex:page >

<script>

function launchWindow()

{

window.open("/apex/Case_consolidated_View_2?CaseListViews='yes'");

}

</script>

</apex:page>

Please let me know what I can do differently to make this work. Do I need a controller and page reference? In advance, I'll let you know that I am an admin-learning-to-code, so any detailed explanations to your solution in plain English are much appreciated.

Thank you so much!

1
  • This seems to be working, except that only the Salesforce sidebar and hearder are displayed -- with nothing inside it -- when I click the "Case List View" tab.
    – GSquared
    Aug 24, 2016 at 21:41

1 Answer 1

2

You have your "!" character in the wrong place:

{!if($CurrentPage.parameters.CaseListViews != 'yes',  
  null,urlFor($Action.Case.Tab , $ObjectType.Case , null, true))}

Merge fields are always {! ... }.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .