How to view a visualforce page on a Skuid detail page

Nic AustinNic Austin Member
edited June 25 in Questions
I have created my Skuid detail page for opportunities and I am needing to include a third party app called Cirrus Files. It comes as a visualforce page but for the life of me I cannot figure out how to include it on the skuid detail page. I have pasted the visualforce page info for the app below. Any help would be much appreciated!
<apex:page standardController="Opportunity" tabStyle="Opportunity" cache="false">
    <c:GDrive recordType="Opportunity" recordId="{!opportunity.Id}"/>  </apex:page>
«1

Comments

  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    I think.... Add a template field where you'd like the Cirrus Files page. Set the template to allow HTML. Put the URL for this page in an iframe element. Not sure how to tweak the apex page to accept a URL parameter though. You'll have to tweak the apex page to take the ID this way. Never tried this but I hope it's easy to do.
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    Found this. {!$CurrentPage.parameters.Paramtervalue}
  • Nic AustinNic Austin Member
    edited November 2014
    So Im guessing the visualforce mark ups would then look like this instead?

    <apex:page standardController="Opportunity" tabStyle="Opportunity" cache="false">
        <c:GDrive recordType="Opportunity" recordId="{!$CurrentPage.parameters.Paramtervalue}"/>
    </apex:page>
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    Where parameter value is whatever you've in the URL. Ie. OppID
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    Hehehe. . Dunno really. Google searches mostly. Lemeno though. I'll have to do the same as I've also got Cirrus Files.
  • Nic AustinNic Austin Member
    edited November 2014
    Yeah I dont think route is going to work. You cannot edit the cirrus component visualforce page. I'll have to think of another route. Ill let you know what I find.

  • Moshe KarmelMoshe Karmel Member
    edited June 25
    Preview the VF page and see what the URL looks like, then take the part that starts with "/apex" until the end of the URL, for example "/apex/SpringCM_Opportunity". Then add an ID parameter to the URL like "?id=". Then drag a template field into your skuid page that is on the Opportunity model, and enter the following...
    <iframe src="/apex/YOURURL?id={{{Id}}}&isdtp=mn" width="70%" height="800px" frameborder="false"></iframe>
  • Pat VachonPat Vachon Member ✭✭
    edited January 2016
    Does that work? The opp id is needed in the apex page.
  • Moshe KarmelMoshe Karmel Member
    edited December 2014
    I believe the apex class gets the Id from the URL so this should work.
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    If that doesn't work, make your own page using the Cirrus page as a template.
  • Nic AustinNic Austin Member
    edited November 2014
    Dang, it almost works perfectly but when I use the {{Id}} it is giving me a message in the iframe that the "Id value is not valid for the Opportunity standard controller" but when I take out the {{Id}} and just place the actual Id of the opportunity I am looking at, then it works. I know I must be getting close. 

  • Moshe KarmelMoshe Karmel Member
    edited December 2014
    Try using three curly braces {{{Id}}} instead of two {{Id}}. Also see if it helps to add on the beginning of the URL. Or try "&id=" instead of "?id=". Or try unchecking  "Do not run template on each row". I was debugging this today :) .
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    Nick - that error message most likely means you have the template component tied to a model that doesn't have opportunities in it.   A nice hack for your troubleshooting is to put the merge fields you are trying to pass as URL parameters outslde the HTML code in your template.  In this case it might be: 
    ID = {{{Id}}}
    <iframe src="/apex/YOURURL?id={{{Id}}}&isdtp=mn" width="70%" height="800px" frameborder="false"></iframe>
    This way you can make sure your data merges are good before you go on to make sure your VF code is good. 



  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    K. Well. Learned a thing or two about putting cirrus into a template.

    I think that you must the entire URL as there is a namespace prefix for the visualforce page. Basically means that the default site URL would not work as it is missing the namespace prefix. ie. IGD.na17.visual.force.com
    image

    The second thing is that header and footer shows up in the template. Anyway to force the page not to do this?

    image

  • Moshe KarmelMoshe Karmel Member
    edited December 2014
    Check this out : http://www.ca-peterson.com/2011/11/magic-isdtp-param.html. There is a (officially unsupported) parameter you can add to the end of your URL: "&isdtp=mn" which will make the header and sidebar disappear!
  • Pat VachonPat Vachon Member ✭✭
    edited June 25
    Woot woot!

    BUT! Use &isdtp=nv
    <iframe src="https://igd.na17.visual.force.com/apex/Opportunities_Component?id={{{Id}}}&isdtp=nv"; width="100%" height="600px"></iframe>
  • BridgetBridget Member
    edited June 25
    Disclaimer: Total newbie here.  I am also trying to include a 3rd party app in my Skuid page (Account Detail page and 3rd party app is FirstRain).  We currently have this in our standard page layout as a VF section.  I tried adding this in my Skuid page with a template component but am getting the same error that Nic was getting: Id value is not valid for the Account standard controller.  When I swap out the {{Id}} or {{{Id}}} for the Id of an Account the page preview works, but it always shows the same Account FirstRain VF section no matter what Account I am previewing.  Here is the HTML code I tried:

    <iframe src="https://arris--uat3--firstrain.cs15.visual.force.com/apex/FirstRain_Account_Snapshot?Id=0013000000Xtl4SAAR&isdtp=vw" width="100%" height="600px" frameborder="0"/>

    Code versions mentioned above (starting with<iframe src="/apex...) did not work for me.  I got a URL no longer exists error.
    Any suggestions?  Is there any other info I can provide to help trouble shoot?  Any advice is greatly appreciated.  Thank you!
  • Pat VachonPat Vachon Member ✭✭
    edited January 2016
    Have you tried the other options for isdtp? vw is for the service cloud console. nv is what I used to get my Cirrus Files visualforce to work in my Skuid page.
    http://www.ca-peterson.com/2011/11/magic-isdtp-param.html
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    Bridget; here are few ideas. 
    1. Your template compoent is connected to a model. Is this model set on the account object? If it on some other ojbect (say contacts) then the Id field will not be correct.  You'd want to pass  AccountId into the merge syntax. 
    2. Is the Id field (or AccountId as the case may be) in your model? 
    3. Preview the page and put your cursor over the section where you are getting the error message.  Right Click and select "inspect element" from the menu (Hopefully you are using Chrome...)  Look at the URL that is actually getting passed in the iFrame.  Here you can see what is actually getting sent. 

    Hopefully this helps... 
  • BridgetBridget Member
    edited January 2015
    Thanks guys!  I got this to work in Preview (using triple curly brackets around the merge field 'Id') but oddly enough it still shows the error in the Page Builder screen.  Is that expected behavior?

    I got the following variations all to work in preview.  Is there a recommended variation? nv, vw or mn?

    <iframe src="https://arris--uat3--firstrain.cs15.visual.force.com/apex/FirstRain_Account_Snapshot?Id={{{Id}}}&isdtp=nv"; width="100%" height="600px"></iframe>

    <iframe src="https://arris--uat3--firstrain.cs15.visual.force.com/apex/FirstRain_Account_Snapshot?Id={{{Id}}}&isdtp=vw" width="100%" height="600px" frameborder="0"/>

    <iframe src="https://arris--uat3--firstrain.cs15.visual.force.com/apex/FirstRain_Account_Snapshot?Id={{{Id}}}&isdtp=mn" width="100%" height="800px" frameborder="false"></iframe>

    I appreciate all your help!  This was such a thrill to get this working!
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    Generally these pages do not show in the page builder, because you are not passing any real model data into the template in the builder preview.  But you really only care about the previewed page.. right? 
  • BridgetBridget Member
    edited January 2015
    Really good point Rob!  Rookie mistake :)  I guess I thought it would show the framework of the page or at least no error.  I'll let the team know of this nuance.  Thanks so much for the help on this one!
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    One more suggestion.  If you uncheck the "Allow Html" box in the template properties,  it won't try to render the iframe code in the builder.  You willl just see the HTML code,  but at least you won't see the error message.

    image
     
  • Jarrod HinsonJarrod Hinson Member
    edited January 2015
    How can we make this iframe solution work with "/apex/pagename"? I can't get it to work for any page due to the name space being skuid , I have to include the full url https and everything and this is bad because sandbox vs production this is going to break.
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    You can use the syntax "/apex/c__pagename"  and salesforce will automatically append the right namespace in front of your VF page.  For more details see this Stackexchange post 
  • Jarrod HinsonJarrod Hinson Member
    edited January 2015
    WOW Thats awesome and it worked! thanks Rob
  • jdbuergerjdbuerger Member ✭✭
    edited October 2017
    I just wanted to chime in that this thread was great. The end code worked perfectly. I also use Cirrus Files and wanted to add it to my Skuid pages. My only regret was that it took me an hour of searching to find this thread. You should think about building some basic tutorials for this kind of thing and for managing custom buttons. Most of us use third party applications (like Cirrus Files, DocuSign and LOOP) in our Salesforce instances, but your documentation has very little on how to add the buttons and VF pages that those third party apps incorporate.
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    Yes John,  totally get you there.  We are working to improve our documentation.  Just a wee bit behind... 
  • edited October 2019
    I used this for Box.com installed package. Replace "Contact" with your object name.

    <html><iframe src="/apex/box__BOXSection?id={{{$Model.Contact.data.0.Id15}}}&param=Contact_Box_Section" width="70%" height="800px" frameborder="false">
    </iframe>
    </html>

    Worked like a charm.
  • edited July 2015
    In my case it can be unmanaged package or managed package in production or sandbox. I wanted to use URLFOR in skuid. Is there any way to do that? I want to get instance url dynamically in skuid. Or is there any way i can pass parameters to skuid page from VF page in which it is included. 
Sign In or Register to comment.