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 :
Microsoft Dynamics AX (Archived)

How to delete related records, when a record is deleted? How to recalculate data after the deletion?

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to ask for an advise on what approach should I use, as I have the following scenario:

After a record (say Assignment) is deleted in the AX 2012, all the related records (say Time Entries) should be deleted, and a complex recalculation should be triggered for another reporting record (containing all the Assignments that are remaining). 

I am new to Axapta and I have a few years experience with CRM.

I will check the Axapta SDK today, but from what I understand, I can have a workflow to delete the related entities, once the Assignment is deleted, but the recalculation might be quite complex to be handled by the workflow itself... so what could I use for it? Or should I use something else instead of a workflow for the entire process?

Thanks.

Best Regards,

Evgeni Dyulgerov

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Florian Hopfner Profile Picture
    2,466 on at

    The deletion scenario you describe is usually done by using delete actions on the tables. These allow you to automatically delete records in related tables.

    For the recalculation, you can add an event handler to the delete method of the assignment table to trigger the recalculation logic.

  • Verified answer
    Sukrut Parab Profile Picture
    71,739 Moderator on at

    Workflow is not suitable in your scenario. Delete action can take care of your fist question. Read more about delete action on below link. Regarding recalculation you can do that in pre event handler.

    docs.microsoft.com/.../how-to-create-delete-actions

  • Verified answer
    Hossein.K Profile Picture
    6,648 on at

    as mentioned , and also event handler:

    www.erpsoftwareblog.com/.../event-handling-in-microsoft-dynamics-ax-2012

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans