• Dimple riar
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I am new to integration and trying a salesforce to salesforce integration using canvas. I am facing a problem while retrieving canvas parameters in visual force page. Not sure what I am doing wrong. Following is the code added on visual force page to retrieve parameter:
<script>
Sfdc.canvas(function(){
var sr = JSON.parse('<%=signedRequestJson%>');
Sfdc.canvas.byId('username').innerHTML = sr.context.environment.parameters.contactId ; });
</script> 
Please help.
I am new to integration and trying a salesforce to salesforce integration using canvas. I am facing a problem while retrieving canvas parameters in visual force page. Not sure what I am doing wrong. Following is the code added on visual force page to retrieve parameter:
<script>
Sfdc.canvas(function(){
var sr = JSON.parse('<%=signedRequestJson%>');
Sfdc.canvas.byId('username').innerHTML = sr.context.environment.parameters.contactId ; });
</script> 
Please help.

We are using the Canvas framework to build our integrated application, a part of which involves modifying the Opportunity detail page to include a new section where our application runs.  We currently have this working so that Canvas connects securely to our application, and displays our UI within the designated window correctly.  We also receive most of the data we need to initialize our application during the Canvas OAuth linkup process, with one exception: we need to know the ID of the Opportunity the user was viewing when our application was launched, but this piece of data is not supplied in the Canvas context object.

 

Can anybody tell us how we might be able to retrieve the Opportunity Id (or Account Id) for the detail screen the user is currently viewing when our application is launched?

 

It seems like a simple task, but we can't find any documentation on how to go about it.