Skip to content

Instantly share code, notes, and snippets.

@mtetlow
Created May 26, 2014 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtetlow/80789a679efe8e18465e to your computer and use it in GitHub Desktop.
Save mtetlow/80789a679efe8e18465e to your computer and use it in GitHub Desktop.
<apex:page docType="html-5.0" standardStylesheets="false" showHeader="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false">
<html>
<head>
<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script>
<script type='text/javascript'>
Sfdc.canvas.publisher.subscribe({
name: "publisher.showPanel",
onData:function(e) {
console.log('test1');
console.log(e);
}
});
Sfdc.canvas.publisher.subscribe({
name: "publisher.post",
onData:function(e) {
console.log('test2');
console.log(e);
}
});
</script>
</head>
<body>
<a href="javascript:sforce.one.createRecord('Account');">Create Account</a>
</body>
</html>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment