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 / Suggestions for a Cont...
Power Apps
Unanswered

Suggestions for a Control that clones a record and related records from a previously entered parent record

(0) ShareShare
ReportReport
Posted on by 389

Hi,

 

I have a simple data entry powerapp that is connected to some entities: 1. Orders > 1:N > 2. Groups > 1:N > 3. Products & 4. Decorations

 

When a user in my app creates an Order, they will be manually entering details through a form control to create a Group. That Group can contain many Products and Decorations and those are also entered through separate forms and are patched to the related parent Group.

 

These entities are all displayed in their own galleries, so when a user wants to delete a Group, they will select the item and an icon will delete the record and all related records.


To speed up the process of entering data in the forms, I'd like to allow the user to "clone" their selected Group and all related Product and Decoration records. What this should functionally do is create a another record for all the same items but give them a new unique record id. This way, instead of entering everything all over again, if there are only minor changes they would just do small edits instead.

Question: In the above scenario, what is the best practise for creating a control (button) that can clone a parent record and related records? I'm imagining it could include a ForAll or Patch function but just curious about other optimized ways of writing the formula.

Any help is greatly appreciated! 

I have the same question (0)
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @virakones,

    I don't think there's a best practice in general and or one "does-it-all" operation in canvas apps. Since you're using entities and a CDS backend you can use server-side logic to perform the cloning with the help of some tools/helpers such as https://github.com/demianrasko/Dynamics-365-Workflow-Tools You can leverage this and with no code perform a clone of your record. This way from your app it's just one REST api call with a custom action to CDS to perform the whole cloning, which simplifies your app's code drastically and have re-usable cloning logic for other scenarios.

    Hope this help!

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard