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 :
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

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • A Verma Profile Picture
    55 on at

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

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans