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 Apps / How to automatically a...
Power Apps
Unanswered

How to automatically attach a child record to its parent

(1) ShareShare
ReportReport
Posted on by 2
Hello!
 
I need some ideas on how to meet this requirement...
 
Currently we send a questionnaire (WMQ) to prospective clients as a PDF, and I am looking to digitize this form, get the data into CRM, and connect it to their lead record. I built a site in Power pages to send to prospects and added the WMQ form. When they complete the form, it creates the WMQ record. I created a many to 1 relationship with the lead record. But how do I get the appropriate lead assigned to the WMQ record? My first thought is that there is likely some common data on the WMQ record and Lead record (email most likely), and we can use that data point to run some automation that attaches the records. But looking at classic workflows, what I am comfortable with, I don't see a way to do this. I have some power automate experience, but mainly with SharePoint, not Dynamics. Ideas??
 
TIA!
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,360 Super User 2025 Season 2 on at
    Hi 
     
    Sorry what is WMQ? My brain is too tired to think lol. Also, is the Relationship Record set to Business Required???
     
    I would place a hidden label on the form and put the GUID in there for the Lead Record. This way when the data is submitted, you have it to find the lead record (depending on how you do it).
     
    However, if the Relationship is set to Required, then you actually need to do the Create on the server side, not on the form (is it a patch or what are you doing)
     
    This would mean creating a Plugin that fires before the WMQ record is even created. In this Pre-Post step, you would do your lookup to find the Lead record by using the GUID you had in the form, OR using the email of the submitter (assuming its the same email).
     
    A couple of ways to do it, the plugin is easy, its a small plugin, register the step and done. Loads of examples for this all over but I can help with it if you need.
     
    That or you need to pre-populate the LookUp on the form as it loads, which would be easy enough since you have the email address and (hidden GUID) value in the label.
     
    Then simply use that to create the relationship lookup record (and I am assuming, you have 1 lead with many WMQs or is it the other way?)
     
    Oh actually here is another way. Create the WMQ record and attach it to the lead, as you render the page. That way its just an update to the WMQ row. Just another option 

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard