Skip to main content

Notifications

Community site session details

Community site session details

Session Id : UAVTAxjHzVwS7MeQdW9IWy
Power Apps - Microsoft Dataverse
Unanswered

Delete Records from Dataverse efficiently

Like (0) ShareShare
ReportReport
Posted on 24 Feb 2022 15:45:18 by 7

I have a dataverse table that a user will load about 80k rows to per month via a data flow.

 

Occasionally they will load data that later needs to be removed and reloaded with fresh data.

 

So, what I need to be able to do in this situation is to automate the removal of the previous version of the data, then triggering the data flow to load the new data.

 

I haven't been able to find a way to do this with any level of efficiency. I would hope that this many rows could be deleted in just a couple of seconds, but I've only been able to do it in PowerApps using "RemoveIf" and that takes 10 minutes just to remove 2k records!

 

Please help!!

  • Navmeetbarmi Profile Picture
    4 on 21 Feb 2024 at 03:26:32
    Re: Delete Records from Dataverse efficiently

    Hi 

    If you still need help with this issue I can help.

  • KiwiPeteUK Profile Picture
    10 on 06 Sep 2023 at 07:16:03
    Re: Delete Records from Dataverse efficiently

    I know this is a bit of an old thread however I recently  had a similar challenge.  I got around it by using a staging table with the 'to be validated' data.  The data flow was set to 'Load to Existing Table' with a composite key and set to 'Delete rows that no longer exist in the query output'.  This ensured that staging table only contains the latest imported data.  Once validated this staging table is then uploaded to the history table.  This way there is no deletion of records required : -) and only validated data is loaded to the confirmed historic dataset.

  • Andy3 Profile Picture
    7 on 28 Feb 2022 at 10:36:40
    Re: Delete Records from Dataverse efficiently

    Thanks for this.

    Your phrasing makes me think that I'm using Dataverse incorrectly.

    "If you truly need to automate this"

     

    I have a user who needs to load data, then it needs checking by superiors, and more often than not it will be rejected and need to be reloaded (with changes). That reload will require the original data to have been deleted first to avoid duplication. 

    Is this an unusual process for dataverse? Is it expected that the dataverse only ever has data written to it and never deleted?

  • ChrisPiasecki Profile Picture
    6,389 Most Valuable Professional on 25 Feb 2022 at 20:59:13
    Re: Delete Records from Dataverse efficiently

    Hi @Andy3,

     

    You can do a Bulk Deletion Job like @rampprakash mentioned in an ad-hoc need. If you truly need to Automate this along with loading other data in a flow, you can use the Call an Unbound Action using the Dataverse connector. There is a BulkDelete action available in the list. You will have to use some JSON syntax for some of the parameters like filtering and such which can be a bit tricky.

     

    Here is an article that walks through an example though which should help you.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Ram Prakash Profile Picture
    5,166 Super User 2025 Season 1 on 25 Feb 2022 at 09:36:49
    Re: Delete Records from Dataverse efficiently

    Hello @Andy3 

     

    There is an Option Called SYSTEM JOBS in Dataverse, you can use the same.

     

    1. Navigate to https://make.powerapps.com

    2. Click Gear Icon at the Top --> Click Advance Settings

    3. Click Settings --> Click System Jobs

    4. Click More Action

    5. Click Bulk Delete --> Select Look for as Entity --> and input the codition

    6. Click Next

     

    When compared to other deletion it will be quick Fast in Async mode

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 15

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics