Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Cannot make SO-relation-fields/Protocoll links update SO WIN

For a customer I have a project-relation field.

I have also added code in my system save script so that the project will be updated upon values from the request. Everything works smooth.

The only annoying thing is that when the user afterwards view the ticket and click on the project relation field SO WIN will open but the new values will not be there until the user does a SHIFT+F5 + navigates to another projects and back?

First I believed the reason for this was that the default link in CS are without any refresh parameters: The default link looks like this:

  • superoffice:project.main.activate?project_id=164471

But after adding my own buttons and tried the following methods...

  • superoffice:project.main.activate.refresh?project_id=164471
  • superoffice:project.main.activate.flush?project_id=164471
  • superoffice:project.main.activate.reload?project_id=164471

...I realize neither of these methods works as desired. Some of them will simulate a SHIFT+F5 and update some values like project-members but still the user needs to navigate back and forward to se new updated values like project Information or project status.

This behavior sucks for the end user. Anyone with a suggestion how to solve this? If not I guess I need to add to the SuperOffice wish list. Because it should be able to update the client with some method.



Correct me if I am wrong:

You have changed the db fields from outside the Win client, and then expect Win by some simple means to update its GUI?

There is no such feature! The closest we have is a Shift-F5 and that one has over the years become nealry as heavy as a complete restart. Also, as you probably discovered, it does not by any means reload everything and besides it has some side-effects like reconfiguring factory column settings in all archives that are most probably not what you wanted!
(Believe it or not, when this was introduced over a decade ago, it was never meant to be published!)

Bottom line, registering a wish is your best bet.
With the advent of more and more netserver based extentions, this is becoming a recurring issue but not a trivial one to solve with our current Win code base.


Af: Conrad Weyns 12. okt 2016

Ok, I will register a wish.

I wonder however; would the web client have been updated automatically?

Af: Gustaf Cullin 12. okt 2016

I couldn't say.
If no one answers here, try a post in the Web forums.

Af: Conrad Weyns 13. okt 2016

Hi Gustaf,

Assuming the user is viewing CS in one browser tab, and Sales and Marketing in another tab....when a CS script updates a project file, it will not just magically be seen as updated in the Sales and Marketing client without a page refresh, or navigating to the next project and back again.

There are no web sockets just listening for database changes. Nothing like that.

Best regards.


Af: Tony Yates 13. okt 2016

In 8.1 this will be fixed.
We now have a lightweight flush and a heavyweight flush (old shift-f5 sledgehammer).

The flush soprotocol is now doing a shallow flush. This is clearing all resident data and forcing every view to refresh. It is not re-creating GUI components.

A new soprotocol, deepflush, is now equivalent to the old shift-f5 expect it is better at clearing all resident data. This one will also re-construct GUI components like all archives, udef views etc. Use this one with care as it will fallback to factory settings.

The COM Application API has 2 new methods: PostShallowFlushEvent and PostDeepFlushEvent.

The names should reflect the fact that these cannot be synchronous methods.
I.o.w. if you are inside an in-process Script event, do not expect to be able to flush the entire App while retaining control. I am sure you can understand why this is so :-)

Also: F5 (simple F5, no shift F5) is now bound to a shallow flush instead of a refresh as it was before. The refresh merely caused the active archive to reload.

To test this: Switch to Web, make a change to sonme company fields and save. Switch back to Win, hit F5. If the force is with me, you'll see it all update :-) Compared to the shift-f5, this is fast too.




        [id(72), helpstring("Post an idle message to perform a shallow flush sequence - data only, no GUI components are re-created")]
        HRESULT PostShallowFlushEvent();

        [id(73), helpstring("Post an idle message to perform a deep flush sequence, includes reconstruction of GUI componennts!")]
        HRESULT PostDeepFlushEvent();

Af: Conrad Weyns 30. jan 2017

I have a question about the flush-methods for Web. Do they affect only the current SO user, or all users?

Af: Frode Lillerud 30. jan 2017

I have no idea!
Try the Web forum Frode... People see SO WIN.. you know

Af: Conrad Weyns 30. jan 2017