Newer Version Available

This content describes an older version of this product. View Latest

Creating a Canvas App Event

The following code example shows how to call the publish method to create a canvas app event. If you’re using a namespace, the event name must be prefaced by the namespace. For example, namespace.eventName.

1Sfdc.canvas(function() {
2    sr = JSON.parse('<%=signedRequestJson%>');
3    Sfdc.canvas.client.publish(sr.client,
4        {name : "mynamespace.statusChanged", payload : {status : 'Completed'}});
5});