Skip to main content

We are overriding our “Task” Edit and View objects to go to a VisualForce page:


MDI.page





(Have been playing around with "View/Edit" vs distinguishing "View" and "Edit" separately and the results seem to be the same)


The page assignments are set up like so:



Both view and edit work as expected when the Task is suppose to load the Skuid Page (type .


However Tasks that are suppose to override to the standard layouts don’t work so well…


You can view the object fine, but when trying to edit the page it just redirects and ends back up on the view page.


Detailed Results:


If I try to go to a non skuid override task:


cORG_DOMAIN]/DTASK_ID]

It will first redirect to the page override (as expected):
cORG_DOMAIN]/apex/MDI?id=/TASK_ID]&sfdc.override=1

Then redirect to the view task page (as expected):
cORG_DOMAIN]/DTASK_ID]?nooverride=1&sfdc.override=1

When I click the edit button it redirects as follow:
cORG_DOMAIN]/apex/MDI?retURL=%2FtTASK_ID]%3Fnooverride%3D1%26sfdc.override%3D1&scontrolCaching=1&sfdc.override=1&id=&TASK_ID]

Which then redirects it to:
cORG_DOMAIN]/DTASK_ID]?nooverride=1&retURL=%2FtTASK_ID]%3Fnooverride%3D1%26sfdc.override%3D1&scontrolCaching=1&sfdc.override=1

The url were looking for should be something like this, but it doesn't seem to ever redirect to the edit page:
cORG_DOMAIN]/DTASK_ID]/e?retURL=%2FtTASK_ID]

To get this to work, you will need to have 2 separate Visualforce Pages, like this:


MDIView.page


<apex:page standardController="Task" docType="html-5.0" readOnly="true"    extensions="MDIController">
<skuid:page objectType="Task" actionType="View" />
</apex:page>


MDIEdit.page







Some further explanation here that might be helpful: the Object Type and Action Type attributes that you specify here are just passed directly into a SOQL query on the Page Assignment object when the page loads. So when you say objectType=“Task” and actionType=“View”, Skuid does a SOQL query that, in super stripped-down version, is like this:

select … from skuid__Page_Assignment__c where ObjectType = :objectType and ActionType = :actionType

So, if you set actionType to “View,Edit”, Skuid looks for Page Assignment records where ActionType is literally equal to “View,Edit”, which as you can see from the Page Assignments tab, is not a possible value to choose for the “Action Type” field.

That’s why you have to have separate Visualforce Pages that request Page Assignments associated with Task Edit and Task View.



Makes sense, what’s the rationale behind “View/Edit”? 


Also, since you guys changed up the layout I’m not sure how to mark this one as resolved?  (the ability to make code blocks seems to be gone as well)


The rationale behind View/Edit was that it was intended to be used for exactly what you’re doing here, but it ended up causing us way more problems than it solved, so we’ve deprecated it. New installs of Skuid don’t have “View/Edit” or “Tab/List” as options.

Yeah the new UI change has gotten me, too — what I do to add code blocks now is to write my code, then select it and click “pre”, this wraps it in a pre tag and it seems to work well.


Awesome, thats kinda what I figured.  

On the plus side, I can view all the past questions I’ve created now, which is very helpful.

Thanks again for the great support.


Reply