Global Action and Save/Cancel button Redirect back to Skuid page with Params

I have the following URL:

I am using a Global Action and creating an Attach a File to the Case. This is a redirect action

with regards to the retURL I have tried the following:

As I want the return url to be: /apex/skuid__ui?CaseId=50011000003AQptAAG&page=CaseDetailsModel

It works fine to have the return URL to contain CaseId={{$Param.CaseId}} OR page=CaseDetailsModel but I don’t know how to include both in the return URL.

I want to return the URL and have the correct page showing, would you know how to do this.

Also for the Save and Cancel buttons on standard pages.

i.e. If the user wishes to edit a case, then I have the skuid page redirect to the standard edit case page. Is there a way to redirect back to the original skuid page, after they click Save or Cancel on the standard salesforce page, thanks

One problem I see is that the retURL needs to be URL encoded so that when it is passed in the URL it is interpreted correctly.  There cannot be characters like “/” or “?” in the retURL value - because those will get interpreted by the browser as part of the base URL rather than as part of the retURL parameter. 

A more appropriate URL encoding for the returl would be somthing like this. 


I know that looks like ugly code that would be impossible to remember.  We use a cheater URL encoder tool  (like this: when building pages.  

In addition the merge fields  - {{$Param.CaseId}}  shouldn’t be URL encoded because they get replaced with real values before being sent to the browser.  If you did URL encode them the merge wouldn’t work…

Hope that helps. 

Thanks Rob I have built this for the URL:

It goes to the attach file Salesforce page and then redirects me to this URL:

and I get this error:
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.

as the page=CaseDetailsModel prob isn’t correct, can you suggest anything.



Rob, You really need to pull this great information into the tutorials / developer doc. I needed this information and start in the doc first.

You are right Irvin.