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)

How to prevent deleting record which are specified in Lookup

(0) ShareShare
ReportReport
Posted on by 545

How Can we stop deleting record which are specified in Lookup, is it can be achieved through out of the box feature or should write plug-in or custom workflow?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Shahbaaz Ansari Profile Picture
    6,211 on at

    Hi ganesh,

    You can write Plugin code for it, Please check below article how to write plugin on delete

    community.dynamics.com/.../write-a-common-plugin-for-create-update-delete-events-in-dynamics-crm-2011

    If you find it helpful, Please mark my Answer as Verified.

    Best Regards,

    Shahbaaz

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Ganesh,

    Lookup records also belongs to entity so  you can achieve this using security role . Try to remove entity delete privileges of the assigned user security role.

    Hope this helps.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Yes if you want to delete based on some condition then you can write plugin or  configure work flow .

  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi,

    you can stop a user from deleting a record if it being used in another lookup using out of the box relationship behavior.

    use cascading behavior and set restrict delete to All.

    refer to the cascading behaviour given here :

    msdn.microsoft.com/.../gg309412.aspx

    if you need to do on some condition then obviously you will have to write a plugin.

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