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
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.
Vatsal
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
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?
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!
Francesco, please can you answer my above question.
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
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.
secondary entity applies only to the SetRelated and RemoveRelated messages, which are deprecated.
So secondary entity is deprecated too ...
Forget it :-)
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Aric Levin - MVP 2 Moderator
MA-04060624-0 1