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 / Simplifying creating r...
Power Pages
Answered

Simplifying creating related records

(0) ShareShare
ReportReport
Posted on by 30

I am currently displaying an Entity List of existing entities on my portal. I am trying to connect the Detail view from this list to an Entity Form in Insert mode, such that I can create a related record in another entity. However, I don't want to have the user have to find the ID from a lookup list - I want to use the ID from the original Entity List, which the portal should have based on which row's detail link was selected. I did some searching, and found a suggestion to add the following Javascript to my Entity Form:

$(document).ready(function() {
 $('#new_lookupattribute').val("{{request.params['refid']}}").closest('.lookup').hide();
});

(I replaced #new_lookupattribute with the name of my lookup field). However, it doesn't appear to be doing anything - it neither pulls the ID, nor hides the lookup field. Any suggestions to getting this to work? 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    Fubar Profile Picture
    8,505 Super User 2026 Season 1 on at

    The id of the parent record does pass across to the Details form (where details is Insert), if you are not seeing the id in the request.params double check the name of the variable that you are actual passing from the entity list (the default is 'id' not 'refid' if you want refid you need to set ID Query String Parameter Name = refid on the Entity List option [advanced tickbox])

     

    Not sure exactly what you are attempting to do, if all you need is when the record is saved that the Lookup is populated with the parent record then you can achieve this by setting the Set Entity Reference On Save = yes and provide additional details under the Entity Reference tab of the Entity Form definition.

     

  • IKinal Profile Picture
    30 on at

    Thanks for pointing me towards the Entity Reference tab, that indeed allowed me to do what I was trying to do.

     

    For anyone that comes across this, I found some additional useful info about using that tab here: PowerApps Portal - After a record is created (Insert) how can I show / link this record to the next step (also Insert but a different entity) - Microsoft Dynamics CRM Forum Community Forum

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 56

#2
Valantis Profile Picture

Valantis 28

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard