locked
How to create multiple configurable cascading relationship on entities? RRS feed

  • Question

  • Hi,

    I have a custom entity Interest. I have N:1 relationship from Interest to Contact & Lead.

    Desired Result - I want the associated interest records to be deleted when I delete the lead or contact record. 

    Achieved - I have created a configurable cascading relationship behavior between interest and contact. I got the desired result where the interest record gets deleted when I delete contact.

    Couldn't Achieve - I was unable to create a configurable cascading relationship behavior between interest and lead. Dynamics CRM doesn't allow me to create multiple configurable cascading relationship with same related Entity. I want associated interest record to be deleted when I delete lead record.

    Is there any way I could achieve this from UI? If no, then can I achieve this from Plugin? If so, some examples would be really helpful.

    Thanks!!


    • Edited by Anna' Tuesday, August 27, 2013 8:55 PM
    Tuesday, August 27, 2013 7:56 PM

Answers

  • Each entity can only participate as a related (referencing) entity in one parental or configurable cascading relationship. As an alternative, you could create a Referential relationship and write a plugin on pre-delete of lead to delete all related interest records.

    Hope this helps!

    If my response answers your query, pls click 'Mark as Answer' and 'Vote as Helpful'


    Mamta

    • Proposed as answer by _Vikram Wednesday, August 28, 2013 2:05 AM
    • Marked as answer by Anna' Wednesday, August 28, 2013 6:38 PM
    Wednesday, August 28, 2013 1:38 AM

All replies

  • Each entity can only participate as a related (referencing) entity in one parental or configurable cascading relationship. As an alternative, you could create a Referential relationship and write a plugin on pre-delete of lead to delete all related interest records.

    Hope this helps!

    If my response answers your query, pls click 'Mark as Answer' and 'Vote as Helpful'


    Mamta

    • Proposed as answer by _Vikram Wednesday, August 28, 2013 2:05 AM
    • Marked as answer by Anna' Wednesday, August 28, 2013 6:38 PM
    Wednesday, August 28, 2013 1:38 AM
  • Thanks Mamta! That's helpful.

    Does any body has the similar plugins written?It would be great to refer.


    • Edited by Anna' Wednesday, August 28, 2013 9:59 PM
    Wednesday, August 28, 2013 6:49 PM