Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Audit for records deleted from Subgrid

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
    A Verma 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
    RaviKashyap 55,410 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans