Overriding a 'tasks' tab - standardController error for VF page

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm having a little trouble creating a salesforce tab named tasks which redirects to a Skuid page with some task tables. The tasks are not linked to a specific record so I've made a VF page using 'Task' as the standardController. I'm getting the error:

Error: List controllers are not supported for Task
I'm sure I'm doing something daft here... Any ideas? Thanks!

Here's my VF page:
<apex:page standardController="Task" recordSetVar="c"
extensions="skuid.Redirects" action="{!redirect}?page=TaskTab"> </apex:page>
Photo of Louis Skelton

Louis Skelton

  • 5,604 Points 5k badge 2x thumb
  • tremendous

Posted 6 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,814 Points 50k badge 2x thumb
Hi Louis,

Nothing "daft", this is actually tricky since, as you've noticed, the Task object does not support standard overrides of the List or Tab actions.

What you'll need to do is the following (some of which you've probably already done):

  1. Modify your VF Page to have this override syntax:
    <apex:page controller="skuid.Redirects" action="{!redirect}&page=TaskTab"/>
  2. Create a new Visualforce Tab that is associated with this VF Page.
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
I was happy to find this topic as I was having trouble with a task-centric skuid page. Unfortunately the solution provided by Zach is not working.  Here is the error message:

The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores. 

Here's the url that the VF page preview generates:
...skuid.na16.visual.force.com/apex/UI&page=TaskTab

Here's the url when previewing the page from skuid builder:
...skuid.na16.visual.force.com/apex/skuid__ui?page=TaskTab
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,990 Points 5k badge 2x thumb
Jared~

Were you able to create the VF tab? 

Try this for the VF page ... 
<apex:page action="{!redirect}&page=TaskTab" 
extensions="Redirects" 
standardController="Task">
</apex:page>

Thanks!
Karen
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
No go:  Error: Apex class 'Redirects' does not exist
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,990 Points 5k badge 2x thumb
Jared~

Strange, that's exactly how I have my VF page set up ... 

And my VF Tab:

Results in this page: 


One thing I noticed, though, is that our URLs look different: 
Also, what version of Skuid are you running?

Thanks!
Karen
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
Karen,

Thank you for the thorough response.  In production, v7.27.  I will test this in our sandbox, which is on a more recent release of Skuid (8.15.9), and let you know tomorrow.

Thanks again!
Jared
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,814 Points 50k badge 2x thumb
Jared, change your override code to use a ? instead of a & right before page=TaskTab:

<apex:page controller="skuid.Redirects" action="{!redirect}?page=TaskTab"/>
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
Thanks, Zach!  That did the trick.  And thanks to Karen as well.  Probably a good time to update the skuid version in production anyway.
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
Spoke too soon.  The visualforce page works on its own.  However, when I try to access from a visualforce tab, I get this:

You've been INKED! (Something went wrong)
Skuid was unable to redirect the user to standard Salesforce Page Layouts, and no Skuid Page could be used instead.

Visualforce config (I noticed in Karen's screenshot that her VF page has a skuid namespace.  Don't see a way to add that.)



Here's the visualforce page when previewed:



Here's the tab config:



And what happens when I try to use the tab:



This happens when logged in as system administrator.  I have enabled all profiles for this visualforce page.

I get the same results in both the sandbox (v 8.19.5) and production (v 7.27)
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
Spoke too soon.  The visualforce page works on its own.  However, when I try to access from a visualforce tab, I get this:

You've been INKED! (Something went wrong)
Skuid was unable to redirect the user to standard Salesforce Page Layouts, and no Skuid Page could be used instead.

Visualforce config (I noticed in Karen's screenshot that her VF page has a skuid namespace.  Don't see a way to add that.)



Here's the visualforce page when previewed:



Here's the tab config:



And what happens when I try to use the tab:



This happens when logged in as system administrator.  I have enabled all profiles for this visualforce page.

I get the same results in both the sandbox (v 8.19.5) and production (v 7.27)
Photo of Jared Jones

Jared Jones

  • 2,246 Points 2k badge 2x thumb
See previous comment for screenshots and error details.  Visualforce preview of Skuid page is working, but the VF tab is not cooperating.
Photo of Louis Skelton

Louis Skelton

  • 5,604 Points 5k badge 2x thumb
Worked perfectly thanks - almost got there!
Photo of Brandon Klapholz

Brandon Klapholz

  • 390 Points 250 badge 2x thumb
Worked perfectly for me, too.