问题
I have 3 CRM entities: A, B and C. There is a 1:N relationship between A & B. I have a custom activity D. There is a 1:N relation between B and D
On creation of an instance of D, it's "Regarding" field set to an instance of C. C is not related to A or B directly via any direct relationship.
The question: In the form for C, is there a way to somehow get to the ID of the instance Of A(via the "Regarding" field between C & D such as C --> D --> B --> A) and use that ID of A to display a grid of related records of B on the form.
I'm guessing that this would involve an IFrame & javascript?
回答1:
There are two methods I know of.
James has a good blog post @ The Dynamics CRM Green Bible about how to manipulate existing subgrids to display the
FetchXmlyou need. This approach doesn't involve an IFRAME.Chandan shares a way to use the Advanced Find view in an IFRAME that accomplishes a similar effect (written for Dynamics CRM 4, but easily adapted to CRM 2011).
来源:https://stackoverflow.com/questions/8548048/display-a-grid-of-unrelated-records-on-the-form-of-an-entity