Question

Show-HTML doesn't display alert message from activity on submit of local action

Alert message in html is as below

<script for="window" event="onload">

alert("**has been created.");

</script>

I tried on Refresh action- Activity and also Run-Activity to call the Activity with SHow-html method. This is not showing alert message.

Sample alert message is attached.

Comments

Keep up to date on this post and subscribe to comments

Pega
December 3, 2019 - 5:06pm

Pega autogenerated UI is loading HTML into an existing window, so a window load event is not going to trigger as part of refresh section.  Can you just call the function as part of the same auto-generated action that is causing the refresh section?

I think if you were to remove the for and event attributes this might also start to work, but I'd probably recomend calling the function directly.

 

Pega
December 3, 2019 - 6:37pm

Can you also try the following solution?

create section and write script code as

<script type=text/javascript>

window.alert("**has been created.");

</script>

called this in the confirm harness and configured visibility based on the status.

 

December 4, 2019 - 12:04pm

Let me try with Function, if not will try in Harness.