Pass skuid model values to canvas app entity fields in an iframed visual force page

I’ve read every post in this awesome community that contains the word “canvas”, so I’m fairly certain this is a new question…

We have a visual force page that we use on detail pages for various objects (Account, opportunity, etc):

<apex:page standardController="Opportunity">apex:canvasApp applicationName="Lane_Cloud" width="100%" entityFields="Name,attchCreate__c,attchRead__c,attchDelete__c,attchTabList__c,attchTabActive__c" />
</apex:page>

We want to include this canvas app in our skuid detail page. Thanks to previous conversations posted, I’ve got a template set up to display the VF page in an iframe:

<iframe src="/apex/c__Opportunity_Attachments"?id={{{$Model&#46;Opportunity&#46;data&#46;0&#46;Id15}}}&amp;isdtp=mn" width="80%" height="400px" frameborder="false"></iframe>

The page is showing up, but without any of the entity field values. How do you get the values from the data model into the entity fields for the canvas app?

^bump^

Is this possible?

This looks like a Visualforce problem not a Skuid problem — you may need to request each individual field on the Opportunity record manually through Visualforce merge variables, otherwise the Standard Controller won’t request those fields and won’t have them available when it loads the Canvas app, e.g.

<apex:page standardController=“Opportunity”>

<apex:variable var=“name” value=“{!Opportunity.Name}”/>
<apex:variable var=“attachCreate” value=“{!Opportunity.attchCreate__c}”/>
<apex:variable var=“attachRead” value=“{!Opportunity.attchRead__c}”/>

<apex:canvasApp applicationName=“Lane_Cloud” width=“100%” entityFields=“Name,attchCreate__c,attchRead__c” />
</apex:page>

Zach,

Thanks for the tip, will try that out.  Meanwhile, we’ve done a bit more troubleshooting.  When inspecting the json for the canvas app in the skuid and non-skuid versions, the only difference is that the skuid version does not have the record information.  Everything else is identical.

Non skuid:

{&nbsp; "algorithm": "HMACSHA256",<br />&nbsp; "issuedAt": 1993913602,<br />&nbsp; "userId": "match&#46;&#46;&#46;",<br />&nbsp; "client": {match&#46;&#46;&#46;},<br />&nbsp; "context": {<br />&nbsp; &nbsp; "user": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "links": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "application": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "organization": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "environment": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; &nbsp; "parameters": {<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; "record": {<br />&nbsp; &nbsp; &nbsp; &nbsp; "attributes": {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "type": "Opportunity",<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "url": "/services/data/v36&#46;0/sobjects/Opportunity/006&#46;&#46;&#46;"<br />&nbsp; &nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; &nbsp; "Id": "00617000008VaOuAAK",<br />&nbsp; &nbsp; &nbsp; &nbsp; "Name": "Sandbox Refresh - 2nd Test",<br />&nbsp; &nbsp; &nbsp; &nbsp; "attchCreate__c": "Files,Customer File,PM Bids,PM Re-Bids,Value Analysis,Customer Bid,Pre-Award,Final",<br />&nbsp; &nbsp; &nbsp; &nbsp; "attchRead__c": "Files,Customer File,PM Bids,PM Re-Bids,Value Analysis,Customer Bid,Pre-Award,Final",<br />&nbsp; &nbsp; &nbsp; &nbsp; "attchDelete__c": "Files,Customer File,PM Bids,PM Re-Bids,Value Analysis,Customer Bid,Pre-Award,Final",<br />&nbsp; &nbsp; &nbsp; &nbsp; "attchTabList__c": "Files,Customer File,PM Bids,PM Re-Bids,Value Analysis,Customer Bid,Pre-Award,Final",<br />&nbsp; &nbsp; &nbsp; &nbsp; "attchTabActive__c": "Customer Bid"<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; "version": {match&#46;&#46;&#46;}<br />&nbsp; &nbsp; }<br />&nbsp; }<br />}


skuid:

{&nbsp; "algorithm": "HMACSHA256",<br />&nbsp; "issuedAt": 1993913602,<br />&nbsp; "userId": "match&#46;&#46;&#46;",<br />&nbsp; "client": {match&#46;&#46;&#46;},<br />&nbsp; "context": {<br />&nbsp; &nbsp; "user": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "links": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "application": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "organization": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; "environment": {match&#46;&#46;&#46;},<br />&nbsp; &nbsp; &nbsp; "parameters": {<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; "record": {<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; "version": {match&#46;&#46;&#46;}<br />&nbsp; &nbsp; }<br />&nbsp; }<br />}

I found the problem. I had put a quotation mark where it shouldn’t have been.

The apex variables mentioned in Zach’s post were not needed.

VF + Canvas + Skuid = Amazing