Hi,
I want to be able to refresh SuperOffice Online webpanels using javascript in an app hosted in azure (embedded in a SO WebPanel).
I can call SuperOffice.ClientCrossMessaging.refresh() for onPrem installations but it doesn't appear to work for Online. If this a cross-domain issue?
What is the best solution for achieving this for online?
Cheers
Rich
Alle Antworten (6)
Hi Rich,
we have several webapplications running in Azure, hosted on our own domain, which are webpanels in SuperOffice Online, where ClientCrossMessaging works fine.
The javascript for ClientCrossMessaging.js is included as a static file in our webapp.
Do you get any errors in the console in the browser?
Hi Frode,
No, I don;t get anything, which is why I can't figure out the problem!
I have setup a test bench here, where I host a very simple webpage locally and expose it to the web using nkrok.
I have this installed exactly the same in both an OnPrem Version of SO and in my SOD version. All it does is call Refresh, it works in my OnPrem but not SOD!
I have not change any value on the Company record, does this make any difference? I.e. does the record only refresh if there is a change to the record?
In the OnPrem version, I can see the webpanels re-load, but nothing in SOD.
Cheers
Rich
Hi Richard,
I'm not sure if the refresh method is buggy, but you can achieve the same by explicitly navigating to the same contact_id.
Here are two approaches that works on my machine. Either manually like this:
parent.postMessage({"command": "soprotocol", "arguments": "contact.main?contact_id=2832430"}, "*");
or by using SuperOffice library like this:
In the second example you just need to include the file from https://github.com/SuperOffice/DevNet/blob/b6600902ec7daa09fcf2ce635f352c8fa3b50f83/CrossMessaging/SoClientCrossMessaging.js
The second example was supposed to be this (but apparently the forum parses HTML code...)
button onclick=SuperOffice.ClientCrossMessaging.executeSoProtocol("contact.main?contact_id=2832430")>Execute SOProtocol
Hi Frode,
Thanks for this, but still no joy.
I can't figure it out, it's a weird one!
Cheers
Rich