Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Design & Build
Unanswered

Open List actions in same window as list

Like (1) ShareShare
ReportReport
Posted on 8 May 2025 08:07:31 by
Hey,
I implemented a list on my power pages website and enabled the action "Create a new Record" with the Target type webpage.
By default the webpage then opens in a new tab when clicking on create.
How can I change my settings to open the webpage in the same tab as the list?
 
Categories:
  • Suggested answer
    Jon Unzueta Profile Picture
    772 on 28 May 2025 at 15:11:51
    Open List actions in same window as list
     
     

    To make the "Create a new record" action in a Power Pages list open in the same tab instead of a new one, you can adjust this behavior using JavaScript customization or by modifying the list configuration in the portal management app.

    Here’s how you can approach it:


    Option 1: Use JavaScript to Override Target Behavior

    If the list is rendered using the standard Power Pages list component, you can inject JavaScript to override the default behavior of opening in a new tab.

    Steps:

    1. Go to your Power Pages site.
    2. Open the Web Page where the list is embedded.
    3. Add a Web Page Script or custom JavaScript in the page’s source or via a Web File.

    Sample Script:

    <script>
      document.addEventListener("DOMContentLoaded", function () {
        const createLinks = document.querySelectorAll("a[data-action='create']");
        createLinks.forEach(link => {
          link.setAttribute("target", "_self");
        });
      });
    </script

    This script finds the "Create" action links and forces them to open in the same tab (_self).


    Option 2: Use Entity List Configuration (Portal Management App)

    If you're using the Portal Management app:

    1. Go to Entity Lists.
    2. Open the list you're using.
    3. Scroll to the "Create" section.
    4. If you're using a Web Page as the target:
      • Ensure the Target Type is set to Web Page.
      • The default behavior is to open in a new tab, but you can override this with JavaScript as above.

    Option 3: Use Modal Dialog (Alternative UX)

    If you want to avoid navigation altogether, consider using a modal dialog for record creation. This requires more advanced customization using Liquid + JavaScript + Web API, but it provides a smoother UX.

     

    🏷️ Tag me if you have any further questions or if the issue persists.

    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.

    ❤️ Give it a Like if you found the approach useful in any way.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43

Featured topics

Loading started