This sample demonstrates how window.postMessage can be used for communication from embedded web panels to SuperOffice CRM.
The script file SoClientCrossMessaging.js is provided as a convenience wrapper around window.postMessage with the supported commands.
There are three supported commands:
- SuperOffice.ClientCrossMessaging.refresh()
- SuperOffice.ClientCrossMessaging.executeSoProtocol(soprotocol)
- SuperOffice.ClientCrossMessaging.openDocument(documentId)
- Add a web panel to your SuperOffice CRM installation linked to index.html
- Open SuperOffice and the web panel
- Click refresh or soprotocol buttons, or enter a document id and click 'open document'.
- Observe the changes in the SuperOffice CRM client
- Include the file
SoClientCrossMessaging.jsfile in your application - Call the methods
SuperOffice.ClientCrossMessaging.refresh/SuperOffice.ClientCrossMessaging.executeSoProtocolwhen necessary
Note that this functionality was made available from version 8.1, released october 2016.