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 Pages / Power Pages Basic form...
Power Pages
Suggested Answer

Power Pages Basic forms ("save and create new" button)

(1) ShareShare
ReportReport
Posted on by 4
I have a requirement where a basic form exists and I want to include a list of related records (maybe using liquid code/fetchxml so I have full control of the design?)  that the user can repeatedly add to, e.g. perhaps through an inline or modal form, or redirecting to a second page wiith an insert form.

This "add" form might have a "Save and close", which saves and returns to the previous form, and a "Save and create new" which just saves and stays on the same form but cleared so you can continue to add more records with fewer clicks. But not sure if this functionality is actually possible?

I can see I can do things like redirect to another page on success or stay on the page with a success message and keep the form present (but not empty), but not really seeing the ability to have both types of buttons on the same form.

I'm thinking it might be possible to hook into the save success in some way, and do something clever there with javascript?

I'm also wondering if subgrids are the way forward because they seem to have the ability to create, edit and delete sub  records, but I think I'd lose control of the look and feel of the list if I did this approach? Are there any examples of customised subgrids?

I have a pro code background, so I'm also thinking I could just use complete custom forms if really necessary, but I'm trying to explore other options first.
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 1 on at
    1. Custom Modal or Inline Form with Liquid/FetchXML
    Example
    function saveRecord(action) {
      Xrm.WebApi.createRecord("relatedEntityName", data).then(
        function success(result) {
          if (action === 'close') {
            // Redirect back to main form
          } else if (action === 'new') {
            // Clear form fields for the next entry
          }
        },
        function (error) {
          console.log(error.message);
        }
      );
    }
     
     
    2. Subgrid with Customization
    • Subgrid Layouts: If you want to adjust the design, you could override some styling using JavaScript and CSS, though customization is limited.
    • Form Behavior: You could add custom buttons or scripts that trigger different behaviors (like a custom modal for adding records), but it would still involve some degree of UI control trade-offs compared to a fully custom solution.
    3. Custom Web Resources
    • Build a completely custom HTML form with full control over styling and logic.
    • Use JavaScript to handle interactions with the backend (Dataverse or another API).
    • Implement your own logic for "Save and Close" vs. "Save and Create New."
    Chekcout and let me know.
  • Suggested answer
    Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at
    You can't properly add in your own Save & New to the existing functionality - the problem is that you can't adequately pickup when the save has completed. 
     
    You will probably need to build it yourself and make use of the portals Web API to Create the record (as you will get a success response back from the create).
     
    Just a couple of other things:
    • The Redirect is only really for when you use the form in a Web Page (not where it is used as a modal popup)
    • People have tried to pickup the success text message on the form (after save) e.g. using a JS mutation observer (or Timer), 
    • Have seen people do things like add their own buttons using JS, then save to local storage, then click/call the out of the box save, then try and pick up the local storage on the other page etc
    • After save, the subgrid on the parent page will reload and has a 'loaded' event. E.g. may be possible to save to local storage on the create form, then pickup on the subgrid loaded and in JS click the subgrids create button (but not a great user experience)
     
    You can apply/override styling on the subgrids or lists, they use Bootstrap for the general layout/responsive design etc and CSS media to style at different screen widths. But you can't really customize them a lot.
     

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 Pages

#1
DP_Prabh Profile Picture

DP_Prabh 51

#2
rezarizvii Profile Picture

rezarizvii 35

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 35 Most Valuable Professional

Last 30 days Overall leaderboard