Hente poster for mange-til-mange-relationer med overlappende objekter
Udgivet: november 2016
Gælder for: Dynamics CRM 2015
I Microsoft Dynamics CRM 2015 og Microsoft Dynamics CRM Online, når der er en mange-til-mange-relation (N:N) mellem to objekter, oprettes der automatisk et overlappende objekt. Dette gælder for både systemrelationer, der er indbygget i produktet, og brugerdefinerede mange til mange-relationer. Navnet på objektet er angivet i IntersectEntityName-egenskaben i relationens metadata. Navnet på relationen er angivet i SchemaName-egenskaben i relationens metadata.
Du kan bruge de overlappende objekter til at indsnævre resultatsættet i en forespørgsel ved hjælp af IOrganizationService.RetrieveMultiple-metoden eller RetrieveMultipleRequest-meddelelsen. Dog kan du ikke hente overlappende objektposter direkte ved hjælp af QueryExpression-klassen. For at hente posterne i et overlappende objekt skal du bruge FetchExpression-klassen.
Dette emne indeholder
Overlappende objekter
Overlappende objekters metadata
Overlappende objekter
I følgende tabel vises de overlappende objekter, der bruges i N: N-relationer mellem standardobjekter.
IntersectEntity |
MtoM_SchemaName |
MtoM_Entity1 |
MtoM_Entity2 |
---|---|---|---|
accountleads |
accountleads_association |
account |
lead |
campaignactivityitem |
campaignactivitylist_association |
campaignactivity |
list |
campaignactivityitem |
campaignactivitysalesliterature_association |
campaignactivity |
salesliterature |
campaignitem |
campaigncampaign_association |
campaign |
campaign |
campaignitem |
campaignlist_association |
campaign |
list |
campaignitem |
campaignproduct_association |
campaign |
product |
campaignitem |
campaignsalesliterature_association |
campaign |
salesliterature |
competitorproduct |
competitorproduct_association |
competitor |
product |
competitorsalesliterature |
competitorsalesliterature_association |
salesliterature |
competitor |
connectionroleassociation |
connectionroleassociation_association |
connectionrole |
connectionrole |
contactinvoices |
contactinvoices_association |
invoice |
contact |
contactleads |
contactleads_association |
contact |
lead |
contactorders |
contactorders_association |
salesorder |
contact |
contactquotes |
contactquotes_association |
quote |
contact |
entitlementcontacts |
entitlementcontacts_association |
contact |
entitlement |
entitlementproducts |
product_entitlement_association |
product |
entitlement |
entitlementtemplateproducts |
product_entitlementtemplate_association |
product |
entitlementtemplate |
leadcompetitors |
leadcompetitors_association |
lead |
competitor |
leadproduct |
leadproduct_association |
lead |
product |
listmember |
listaccount_association |
list |
account |
listmember |
listcontact_association |
list |
contact |
listmember |
listlead_association |
list |
lead |
opportunitycompetitors |
opportunitycompetitors_association |
opportunity |
competitor |
productassociation |
productassociation_association |
product |
product |
productsalesliterature |
productsalesliterature_association |
product |
salesliterature |
productsubstitute |
productsubstitute_association |
product |
product |
queuemembership |
queuemembership_association |
queue |
systemuser |
roleprivileges |
roleprivileges_association |
privilege |
role |
roletemplateprivileges |
roletemplateprivileges_association |
roletemplate |
privilege |
servicecontractcontacts |
servicecontractcontacts_association |
contact |
contract |
subscriptionmanuallytrackedobject |
contact_subscription_association |
subscription |
contact |
subscriptionmanuallytrackedobject |
task_subscription_association |
subscription |
task |
systemuserprofiles |
systemuserprofiles_association |
systemuser |
fieldsecurityprofile |
systemuserroles |
systemuserroles_association |
systemuser |
role |
teammembership |
teammembership_association |
team |
systemuser |
teamprofiles |
teamprofiles_association |
team |
fieldsecurityprofile |
teamroles |
teamroles_association |
team |
role |
Overlappende objekters metadata
De fleste overlappende objekter er enkle, der kun indeholder nogle få egenskaber, der er nødvendige for at give et link mellem to objekter i N:N-relationen. Hvis du bruger tidligt bundne typer, kan du se et eksempel på det overlappende ContactInvoices-objekt. Dette er tilfældet for alle brugerdefinerede mange til mange-relationer. Der er dog flere overlappende objekter, der har flere egenskaber, der bruges til bestemte funktioner for relationen. For at gøre det lettere at skrive forespørgsler ved hjælp af særlige overlappende objekter findes attributmetadataene i følgende emner:
Se også
Oprette forespørgsler med QueryExpression
Tilpasse metadata til objektrelationer
Hente data med forespørgsler
CampaignActivityItem intersect entity metadata
CampaignItem intersect entity metadata
ListMember intersect entity metadata
Role Privileges intersect entity metadata
Eksempel: Hente poster fra en overlappende tabel
© 2017 Microsoft. Alle rettigheder forbeholdes. Ophavsret