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 / Batch-Dataverse using ...
Power Pages
Suggested Answer

Batch-Dataverse using Server Logic

(0) ShareShare
ReportReport
Posted on by 6
Hi Members,
 
I want to use server logic in Power Pages to update and remove data in two distinct tables in Dataverse, however the records can be more than 5000 to 10000 records. We tried the batch concept, and while it works correctly in normal processes like client side, server logic (server side) is not working properly. For client side and server side can be different code or similar code ? . If anyone tried this process in server logic side kindly give your suggestion...
Categories:
  • Suggested answer
    11manish Profile Picture
    4,676 Super User 2026 Season 2 on at
    Yes, the approach needs to be different between client-side processing and Power Pages Server Logic, even though the underlying business logic can be the same.
     
    For your requirement of updating and deleting 5,000–10,000 Dataverse records across two tables, I would not recommend processing all records in one Power Pages Server Logic request.
     
    Power Pages Server Logic is designed to provide server-side APIs that can read, create, update, and delete Dataverse records securely. However, it is not a
     
    replacement for a long-running bulk-processing engine.

    For 5,000–10,000 records, don't make Power Pages Server Logic perform the entire operation synchronously.
     
    The best design is:
     
    Power Pages Server Logic = secure API + validation + job initiation
    Asynchronous processing = bulk Dataverse update/delete
    Batching = controlled chunks, initially around 100–500 and tuned through testing
     
    This will be much more reliable than simply copying your client-side batch code into Server Logic, particularly when you are updating/deleting records in two different Dataverse tables.
  • Gnanasekar Profile Picture
    6 on at
    @ What do you mean by Asynchronous processing? and can you explain why the server logic cannot treated as long-running bulk-processing engine ? can you share any sample code or any sample flow how its work?
     
    Thank you
  • Suggested answer
    Mohsin Ali Profile Picture
    898 on at
    Hello @Gnanasekar - Power Pages Server Logic should be used for CRUD (Create, Read, Update, Delete) operations, triggering a custom action, Custom API, etc., but not for bulk operations such as processing ~5,000 rows.
     
    Your request through Server Logic might time out after 120 seconds, requiring you to run the API request again. This is neither an ideal nor a recommended approach.
     
    The approach I would recommend, and one I have recently implemented, is to use Azure Functions. Based on your logic, you can send the request from Power Pages Server Logic to an Azure Function and let the Azure Function handle the actual processing. Even with Azure Functions, service requests might occasionally time out or get throttled, but you have more flexibility to implement retry mechanisms and handle failures properly. This would be much harder to manage directly within Server Logic.
     
    So, my recommendation would be to use Power Pages Server Logic along with Azure Functions.
     
    Alternatively, you can use Power Pages Server Logic with Power Automate flows, where the flow has an HTTP trigger. I would recommend this option if you want to avoid the additional development involved with Azure Functions. Power Automate can also handle retries automatically, making it a simpler option for this scenario.
     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 43

#2
sannavajjala87 Profile Picture

sannavajjala87 30 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 20 Super User 2026 Season 2

Last 30 days Overall leaderboard