Setting session on server action 'success' endlessly repeats server action

I have a server action that outputs a session_id (UID variable). I try to save that variable as a session in the browser.

However, by setting that up using dmx-on:success="session1.set('license_session_id',claim_license.data.session_id)" for some reason it refreshes the server action endlessly.

Please see below:

  1. My server action when it’s still working as expected:
<dmx-serverconnect id="claim_license" url="/api/Sc_marketing/claim_license" dmx-param:session_id="session1.data.license_session_id"></dmx-serverconnect>

You can see it auto loads once when opening the page.

  1. I add the onclick event, so it becomes:
<dmx-serverconnect id="claim_license" url="/api/Sc_marketing/claim_license" dmx-param:session_id="session1.data.license_session_id" dmx-on:success="session1.set('license_session_id',claim_license.data.session_id)"></dmx-serverconnect>

It reloads the server action endlessly…

I do NOT have any action set up that loads the ‘claim_license’ server action again.

EDIT: Perhaps this is because the server action refreshes itself because the 'input’parameter changes?

Community Page
Last updated: