web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Delete all data in a Table upon a data entity Import

(1) ShareShare
ReportReport
Posted on by 89

I have a custom data entity with a custom table as its datasource. I want to drop all data in the data source table right when a user selects import in DMF so that the only data that should be in the table is the most recent import, and any rows that came in from the last import would be wiped out.

I have already looked at the data entity callstack and tried multiple methods to put my delete_from (table) code in, but none of them work. I tried mapEntityToDataSource and it deleted every previous record one at a time so that when the import is complete the only record in the table/entity is the very last row.

Thanks in advance!

I have the same question (0)
  • Magno Pereira Profile Picture
    2,439 Moderator on at

    Hey,

    You have a feature in data management that aid you with it. Here you have more details:

    magnomgp.github.io/.../

  • tristansenk99 Profile Picture
    89 on at

    Hi Magno,

    Thanks for your response. I am aware of this feature, the thing is I want to do it through code so if the user forgets to check this flag it will still truncate.

  • GirishS Profile Picture
    27,843 Moderator on at

    Hi tristansenk99,

    Have you tried adding the delete_from in "initializeDataSource"?

    Try adding that and check.

    Thanks,

    Girish S.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 258 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans