Where to place insert crud wrapper directly when page loads
Question
Application Type
Reactive

Hi Community,

We have a use case going on where we want to follow user behaviour and therefore we sometimes have to insert a database record as soon as the page loads. 

  • My first thought was to put it on the OnReady or OnInitialize but this is not best practice since Architecture Dashboard will tell me not to do to server requests in client events. 
  • Second thought was to put it in a Data Action but most of the time Data Action are used to fetch data and it also expects a output parameter which in my case is not needed.

Does anyone know what is best to do for the mentioned use case?

Best,

Bart

You could create a block to manage the record creation and add the action on the OnRender action of the block.

It will be rendered only once on the page and I believe that will not generate warnings.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.