Page History
...
This is the default type of api function; the example above is a sync api function definition. Sync functions will call the client and wait for the api function to execute/return before continuing. Sync api functions can have a return value.
Client side code of the sync api function can return either directly the intended return value or a Promise that in the end resolves with the intended return value. Server will wait for any client returned Promise to resolve before resuming server-side code execution.
In case of component sync functions, if the form is not present in browser's DOM then sync calls will force-load it in a hidden div just in order to execute the sync function on the component.
...
They are useful when for example you want to send progress information to the service client-side while executing a long-running-operation server-side.
Async-now function calls will not send other pending async calls to client nor update the client's state with other pending changes (model updates of components/services/etc.).
Just add "async-now": true (another optional parameter (that by default is false)) to the call definition.
...