web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Secondary Entity in Plugin Registration

(0) ShareShare
ReportReport
Posted on by 6,211

Hi All,

When to use Secondary entity in plugin? Can provide sample code or example?

Is SetRelated and RemovedRelated Message has been deprecate from Dynamic CRM?

Thanks,

Shahbaaz

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Secondary Entity in Plugin Registration

    Hi Shahbaaz,

    From Dynamics CRM 2011 onwards, the ‘SetRelated’ and ‘RemoveRelated’ have been succeeded by the ‘Associate’ and ‘Disassociate’ messages respectively.

    These two messages are basically triggered when a primary entity record is associated/dissociated with/from the secondary entity record via the relationships supported. So, if you’re planning to execute some business logic on association of the associated entities, you can register the plugin against the ‘SetRelated’ message. The ‘RemoveRelated’ works for dissociation of the entity records from each other.

    Thanks,

    Vatsal

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Secondary Entity in Plugin Registration

    Hi Shahbaaz ,

    no, it will not fire because SetRelated belongs to accountleads_association relation, not lead_parent_account.

    Hope it helps.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Shahbaaz Ansari Profile Picture
    6,211 on at
    RE: Secondary Entity in Plugin Registration

    Thanks Francesco, please could you reply below question

    If i am using CRM 2013 when plugin gets trigger when i register my plugin on setRelated message, primary entity to lead and secondary entity to account. i have account lookup on lead form.

    Does it will trigger when i will add value to account lookup and save it?

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Secondary Entity in Plugin Registration

    Hi Shahbaaz,

    you could use it until 2013 version.

    These messages are triggered when a primary entity record is associated (SetRelated) or dissociated (RemoveRelation) with or from the secondary entity record.

    Hope it helps!

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Shahbaaz Ansari Profile Picture
    6,211 on at
    RE: Secondary Entity in Plugin Registration

    Francesco, please can you answer my above question.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Secondary Entity in Plugin Registration

    Hi Shahbaaz,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Shahbaaz Ansari Profile Picture
    6,211 on at
    RE: Secondary Entity in Plugin Registration

    ok thanks, but can you tell me when plugin gets trigger when i register my plugin on setRelated message, primary entity to lead and secondary entity to account. i have account lookup on lead form.

    Does it will trigger when i will add value to account lookup and save it?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Secondary Entity in Plugin Registration

    Hi Shahbaaz,

    secondary entity applies only to the SetRelated and RemoveRelated messages, which are deprecated.

    So secondary entity is deprecated too ...

    Forget it :-)

    Hope it helps.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans