We need to log whenever a user navigates to a screen. We are using the OnReady function but when we do it we get a warning in AI Mentor Studio (Server requests in client events).See attached image
Hi @Aron Skúlason,
When we are using server actions in a client action . There is a request going from browser to server . So when we are using many server action in a same client action so, it causes many request to server. That can slow down performance.
You are using server action directly to the client side which gives you warning !! so whenever you want to use the server action at client side always make reusable client action that use in screen action so you can avoid the warning!!
Also refer this chat link for more:
https://www.outsystems.com/forums/discussion/56141/warning-client-action-calls-several-server-actions-but-only-1-server-action-cal/#:~:text=When%20we%20are%20using%20server,That%20can%20slow%20down%20performance.
https://www.outsystems.com/forums/discussion/62194/security-warning-youre-exposing-a-database-operation-in-the-client-side-validat/
https://www.outsystems.com/forums/discussion/49836/difference-between-screen-action-server-action-and-client-action/
Thanks,
Vipin Yadav
@Vipin Yadav ,
1) This is not the problem this post is about.
2) But it is also horrible advice, it does not remove the problem, it only tricks Service Studio / AI Mentor Studio in not detecting it.
@Aron Skúlason ,
do you want to log other things than are already available as Monitoring/Screen Requests in Service Center ?
Dorine
To reply to : where better to do than in the OnReady : maybe as simple as in a data action that runs at start ??
Hi Aron Skúlason,
You can use Data action for this case. Because the Aggregates and Data Actions of the default screen concurrently start to work just after the OnInitialize.