I'm trying to set up some server and client side before.insert and before.update hooks and I need the document to be enhanced with the result of a server side method.
I cannot do it purely on the client due to lack of certain libraries on the client.
I cannot do it purely on the server because I need the result immediately without which the UI flickers and jumps around too much.
The problem is the server side method being called asynchronously on the client leaving me with undefined.
Is there a clean way to run a blocking function that I can use within a client side before.insert / before.update hook to get some result from the server?
I'm trying to set up some server and client side before.insert and before.update hooks and I need the document to be enhanced with the result of a server side method.
I cannot do it purely on the client due to lack of certain libraries on the client.
I cannot do it purely on the server because I need the result immediately without which the UI flickers and jumps around too much.
The problem is the server side method being called asynchronously on the client leaving me with undefined.
Is there a clean way to run a blocking function that I can use within a client side before.insert / before.update hook to get some result from the server?