function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KnickKnick 

Sfdc.canvas.byId returns null

I have a simple vf page that embeds a canvas application and am trying to populate a form with Salesforce data.

<apex:page showHeader="true">
<script    type="text/javascript" src="/sdk/js/41.0/canvas-all.js"/>
... render some Salesforce stuff
<apex:outputPanel layout="block" id="AppContainer">
<apex:canvasApp developerName="devName" containerId="{!$Component.AppContainer}"/>
<script type="text/javascript">
var inuserid = Sfdc.canvas.byId("inuserid");
... more script stuff
</script

The app renders, and I can inspect elements within the application, however, all calls to find input elements are returning null.
I'm hoping that it's possible to populate this form with Salesforce data (since I'm within a VF page).