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 Pages / Create Record and Rela...
Power Pages
Unanswered

Create Record and Related Records OOB

(0) ShareShare
ReportReport
Posted on by 67

Good Day,

 

I have a table called Purchase Orders and then another called Invoice Lines.

 

These two tables are related by a One-to-Many relationship (One PO - Many Invoice Lines).

 

On my portal I want an administrator to be able to Create a new PO and the Invoice Lines in a single go.

 

Form View is as below:

TheAvo1_0-1699524053039.png

 

When I preview the form I don't see the option to add new Invoice Lines.

 

TheAvo1_1-1699524112938.png

 

I have created the permissions and assigned them as per the below:

TheAvo1_2-1699524191810.png

 

Nothing special about the view... I have the New PO and then added a subgrid below for Invoice Lines.

TheAvo1_3-1699524289613.png

 

Clearly the Relationship is working as you'll not some of the existing Line Items pulled through to the above view.

 

Again, not looking for anything special here.... I'd expect this to work OOB.

 

Any assistance?

 

Thanking you in advance.

 

 

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    By default, you can't create child records without having the parent created first.

     

    One approach to this is using the Portals Web API, but you would have to design your page entirely custom.

     

    Alternatively, what I would do here is have a Basic Form for the parent record Creation, and then redirect the user to an Edit form where they can add the child records.

  • TheAvo1 Profile Picture
    67 on at

    Hi @OliverRodrigues ,

     

    Thanks for the feedback.  I quite like your proposed solution of the redirect to a edit page for the line item. 

     

    How would I link the line items on the redirect to the newly created PO?

     

    Kind Regards,

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @TheAvo1 

     

    In Basic form 

     

    1. Success settings > Redirect to web pages 

    2. Enable the "Append record id to query string" and choose the query parameter name as id 

     

    ragavanrajan_0-1699564044024.png

     

    You can play around a bit here. Hint: Keep two separate web pages one for insert/create and another for edit. 

     

    Alternatively check this article from @OliverRodrigues : 

     

    https://oliverrodrigues365.com/2020/11/22/power-apps-portals-javascript-tip-03-load-edit-modal-after-record-creation/ 

     

    Hope it helps.
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

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 Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard