Project Description

Canvas functionality is a new technology from salesforce.com for force.com platform. This functionality allows direct communication between salesforce’s visualforce pages and third party applications. Browser does not allow to communicate between pages from different domain by default as it is security issue. Canvas from salesforce.com allows support such type of communication, what is its advantage. Third party application can be developed in any web based language(PHP, Java, .NET,..) and it can use javascript.

When user visit visualforce page with canvas application, validation is fired. If all requirements meet, canvas with third party application is displayed. During load of third party application canvas allows to send a bunch of parameters into application from salesforce. These parameters are encoded and third party application must support functionality to decode it. After decoding, application should encode part of parameters with secret key and check it with check sum. This confirms, that third party application is shown in right salesforce org. There are some information about user in parameters, so user can be directly logged into third party application, without entering login credentials again. There are some initials parameters also sent, for example new object which need to be created in third party application and type of operation.

After initial steps user works in third party application as usual. For better user experience, graphic design is changed for canvas, so it looks like salesforce, and user has salesforce look and feel.

When user works in third party application, no communication with visualforce is needed, only in the end of all operations. After user click on save button in third party application, all validations are done in application at first. After that, user is redirect to new page inside canvas, which will send information via javascript (in JSON format) into visualforce page. Visualforce receives these information, parse them and insert into salesforce object. This allows to have data immediately in salesforce to not waste time with kind of synchronization job.