Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Audit for records deleted from Subgrid

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I have a requirement where I have to know the name of the user who deleted the record from a sub-grid.

I have 2 custom entity Credit and Credit Details. The scenario is like if user deletes the record from the Credit Details sub-grid which is in Credit entity. I should either get an email that a record was deleted or have some auditing enabled for deleted records in the sub-grid. Also, deleting the records just removed the records from sub-grid not from the entity.

The records which are getting populated in the sub-grid are fetched from Account entity.

@Note: I don’t have a restrict a user from deleting records. Just need audit enabled for sub-grid.

Regards,

Verma

*This post is locked for comments

  • A Verma Profile Picture
    55 on at
    RE: Audit for records deleted from Subgrid

    Thanks Ravi, this issue has been resolved now your comments help getting the solution.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Audit for records deleted from Subgrid

    Hi,

    When you hit delete in subgrid which has 1:N relationship, it will actually delete the record.

    In this case, if you have the Auditing enabled, you can see the details of the record deleted and who deleted it. If you want to send email, you can write a plugin on delete message of you entity and check the InitiatingUserId and then send an email.

    community.dynamics.com/.../determining-the-initiating-user-details-on-a-c-plug-in-dynamics-365-for-customer-engagement

    When you delete the record which has N:N relationship, it will remove the association and keep the original record as is. In this case, you can write a plugin on disassociate message and perform your logic.

    community.dynamics.com/.../capture-associate-disassociate-events-in-plugins

    You can read about subgrid behaviour here: community.dynamics.com/.../capture-associate-disassociate-events-in-plugins

    Hope this helps.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans