creating a custom button to redirect to a skuid page

  • 2
  • Question
  • Updated 2 years ago
Hello, 

I'm trying to create a custom button on the Account page, non-skuid page, that will open a related page in edit mode. 



I have created a visualforce redirect page with this markup: 
<apex:page standardController="CEPdat__c" extensions="skuid.Redirects" 
       showHeader="false" sidebar="false" readonly="false" docType="html-5.0"
        action="{!IF(canUseSkuid,'',redirect)}" title="Edit {!CEPdat__c.Name}">
    <skuid:page page="CEPred" />
</apex:page>
my custom object's api name is: 
CEPdat__c

Any ideas of what the syntax would be for the Custom Button?

I tried this syntax but it didn't work: 

/{CEPdat__c.Id}/e?retURL=%2F{Account.Id}%3Fcore.apexpages.devmode.url%3D1%26nooverride%3D1%26sfdc.override%3D1
Photo of ns

ns

  • 1,822 Points 1k badge 2x thumb

Posted 2 years ago

  • 2
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
nikrouges,

One option is to try using the url of the Skuid page to redirect straight to that page. For example, if the Skuid Page is called AccountDetailPage then the url for the button would be /apex/skuid__ui?page=AccountDetailPage.  You can add parameters to the url by using the Insert Merge Field option right above the textbox where you enter the url.

Thanks!
Amy
Photo of ns

ns

  • 1,822 Points 1k badge 2x thumb
Amy, 

I've tried this syntax, but when the button is pressed, the skuid page renders but no information is populated into the data fields: 

/apex/skuid__ui?page=CEPred&id={!CEPdat__c.Id}
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
nikrouges,

When you go to the Skuid page do you see the CEPdat Id in the url? I'm sure it is, but on your Skuid page is the appropriate model(s) looking to the url page id to get their Id? Were you able to insert the Id of CEPdat through the Insert Merge Field option? I'm not sure if you can pass the Id of an unrelated object from the Account page (though maybe I don't know enough and CEPdat is related to Account).

Thanks!
Amy