In many Interviews you might have been asked the Question "what is the Use of secondary entity in the plugin registration tool ?".
While using the Plugin Registration tool in Dynamics CRM, we might have rarely or even never used the ‘Secondary Entity’ field and almost always assigned it as ‘none’, but there are some scenarios where this field required.
Secondary Entity use when you have to trigger plugin or retrieve record from Intersect Entity having records of Entities having N:N Relationship.
the above information also available in the CRM SDK.
While using the Plugin Registration tool in Dynamics CRM, we might have rarely or even never used the ‘Secondary Entity’ field and almost always assigned it as ‘none’, but there are some scenarios where this field required.
Secondary Entity use when you have to trigger plugin or retrieve record from Intersect Entity having records of Entities having N:N Relationship.
The following 2 messages require the ‘Secondary Entity’ to be specified while registering a step in Plugin registration:
- SetRelated
- RemoveRelated
These two methods were extensively used in Dynamics CRM 4.0, but they were deprecated from Dynamics CRM 2011 onwards; although you can still use them in 2011 and 2013.
Following is the table shows the out-of-the-box ‘Primary Entity’ and ‘Secondary Entity’ that are supported for both ‘SetRelated’ and ‘RemoveRelated’ messages:Primary Entity | Secondary Entity | Supported Relationships |
---|---|---|
Invoice | Contact | contactinvoices_association |
Lead | Account | accountleads_association |
Lead | Contact | contactleads_association |
Opportunity | Account | opportunity_customer_accounts |
Opportunity | Contact | opportunity_customer_contacts |
Opportunity | Competitor | opportunitycompetitors_associationor |
Product | Lead | leadproduct_association |
Product | Competitor | competitorproduct_association |
Quote | Contact | contactquotes_association |
SalesLiterature | Competitor | competitorsalesliterature_association |
SalesLiterature | Product | productsalesliterature_association |
SalesOrder | Contact | contactorders_association |
Thanks for reading.. :)
No comments:
Post a Comment