You’re running into a real Dataverse limitation, not a Code App problem — and your instinct is correct: client-side duplication is the wrong layer for this kind of workload.
What you’re seeing (one Web API call per child record) is exactly why Microsoft does not recommend handling complex entity graphs from Power Apps Code Apps or Canvas Apps.
✅ Recommended architecture (what Microsoft expects you to do)
For heavy or multi-record Dataverse operations, the correct pattern is:
Client (React / Power Apps) → single server-side Dataverse operation → bulk logic executed inside Dataverse
That server-side operation should be one of the following:
✅ Custom API (preferred)
✅ Action (Dataverse classic)
⚠️ Plug-in (only if you need deep pipeline access)
Why your current approach is slow
Your Code App is doing this:
React
├─ GET GroupItem
├─ GET Items (n records)
├─ POST Item #1
├─ POST Item #2
├─ POST Item #3
├─ ...
That means:
-
multiple HTTPS round trips
-
Dataverse throttling
-
no transaction scope
-
no batching support from pac services
-
no parallel execution guarantees
Even 100 related records becomes painfully slow.
✅ Best solution: Custom API inside Dataverse
This is exactly what Custom APIs were built for.
What you create in Dataverse
A Custom API called something like:
DuplicateGroupItem
Input parameters
Output
Inside the Custom API (server-side)
Implement logic using:
Example logic flow:
1. Retrieve GroupItem
2. Retrieve all related Items
3. Create new GroupItem
4. Clone Items in memory
5. Insert Items using ExecuteMultiple
6. Return new GroupItem Id
All of this runs:
Performance difference is massive.
✅ Benefits of Custom API approach
✔ One call from React
✔ Executes as authenticated Power Platform user
✔ Supports impersonation
✔ Can be reused anywhere
✔ Much faster
✔ Centralized business logic
✔ Transaction support
✔ Works with thousands of related records
This is exactly how Microsoft handles:
-
Quote → Quote Lines copy
-
Opportunity → Products
-
Case duplication
-
Order cloning
🔐 Running as the authenticated user
Custom APIs support:
So the records will show:
“Created by: John Smith”
—not by a service account.
⏱️ Scheduled execution requirement
Since the logic is server-side, you get this for free.
You can trigger the same Custom API from:
No UI required.
🔁 How React calls it
From your Code App, you just call the Custom API endpoint:
POST /api/data/v9.2/DuplicateGroupItem
with:
{
"GroupItemId": "GUID"
}
That’s it.
One call. Everything else happens inside Dataverse.
❌ What not to use
| Option |
Why not |
| Client-side looping |
Slow, throttled |
| Canvas formulas |
Not scalable |
| Power Automate per-record loops |
Even slower |
| Virtual tables |
Not transactional |
| Direct SQL |
Not supported |
| pac service classes |
CRUD only |
⚠️ Plugin vs Custom API
Use:
For duplication, Custom API is the correct choice.
✅ Final recommended architecture
Power Apps Code App (React)
↓
Single call to Custom API
↓
Dataverse plug-in logic
↓
ExecuteMultiple bulk insert
↓
Return new GroupItemId
Summary
Yes — your assumption is correct.
✔ Do NOT duplicate complex entity graphs in the client
✔ Do NOT loop Dataverse calls from React
✔ Implement a server-side Custom API
✔ Execute logic inside Dataverse
✔ Call it from the app with parameters
✔ Reuse it from scheduled Power Automate flows
This is the same pattern Microsoft uses internally for all complex Dataverse operations.