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

Notifications

Announcements

No record found.

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,435 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,827 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans