web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can't trigger JavaScri...
Power Automate
Unanswered

Can't trigger JavaScript command on webpage (to get around the current broken extension issue) PLEASE HELP!!

(0) ShareShare
ReportReport
Posted on by 259

PAD update to extensions has broken some click on links on my web application.

Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

So I am trying the alternative - to use JavaScript to click on a link on the page instead BUT It's not triggering the JavaScript for me on the page...

 

I am trying to run a command, which simulates clicking a link:

javascript .... submitAction_win0(document.win0,'DERIVED_ADDR_UPDATE_ADDRESS$0');The js works when I paste into console (a popup form opens) but in PAD nothing happens at all. I set an alert and that fires but not my submitAction.

 

This is the HTML

 

<a name="DERIVED_ADDR_UPDATE_ADDRESS$0" id="DERIVED_ADDR_UPDATE_ADDRESS$0" ptlinktgt="pt_peoplecode" tabindex="355" onclick="javascript&colon;cancelBubble(event);" href="javascript&colon;submitAction_win0(document.win0,'DERIVED_ADDR_UPDATE_ADDRESS$0');" class="PSHYPERLINK" winautomationvisibilitylandmark="true" mspad-previous-style="" style="">Edit Address</a>

 

 

What is going on I'm totally stuck now! I also tried:

document.getElementById('DERIVED_ADDR_UPDATE_ADDRESS$0').click();

 

Which again works in console but not in PAD


js.png

I have the same question (0)
  • beebul Profile Picture
    259 on at

    Interestingly I found if you use the recorder to click the link it works! And then you can copy that recorded action and use the UI selector to choose another link.

     

    BUT if you use the Action 'Click link on webpage' you get the error:

    Refused to run the JavaScript URL because it violates the following Content Security Policy directive:

    So they have to fix this...

    There you go MS I did your testing for you.

     

    I am having to use the recorder to click certain links at the moment.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard