Set action on alert dialog ok button

I want to perform some action on alert dialog ok button click. How can I do it?

<action-record name="action-survey-todo" model="">
    <field name="survey_state" expr="eval: 0"/>

Hello @pkdadhaniya
prompt attribute allow you to show a confirmation message for any buttons.
However if you want to show a different message on OK button for onClick event I think you need change something on JS. (I’m not sure if it’s what you need)

Hello @pkdadhaniya, you can use action-validate for this purpose.

<alert message="Some message" if="some condition" action="next action if confirmed"/>
1 Like