Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

How do I programmatically access a PARENT ENTITY starting from one of its CHILDREN (using Microsoft.Xrm.Sdk) ?

$
0
0

Hi all,

I'm building a custom solution to integrate CRM 2011 with SharePoint 2010.

Without going too much into details, I am writing a plugin to be fired on the post creation of a "document location" entity (the entity containing information about the SharePoint location). This plugin needs to access the parent entity (a Contact in my case) to which the "document location" belongs and read its ID in order to write it into SharePoint.

A SharePoint item Event Receiver will then be fired when documents are uploaded/modified and, using the entity ID previously written into its parent folder metadata, will access CRM via WCF app to retrieve the entity metadata and do some work with it.

My question is: I can easily create queries to retrieve related entities (children) starting from a specific entity, but can I go the other way (retrieving a parent entity from one of its children?)

Hope I've been clear enough

Thanks

Vince


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>