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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard