Hello all,
I have been asked to show all related activities for an account (we usually create activities from contacts). I know that if I open an account I can do this by selecting Activities from the left menu item and I will be able to see all related activities from all contacts. The issue is my users want to see all of these activities from the Outlook reading pane, and the Activities left menu item is not available for the reading pane.
I then put a subgrid on the account form for activities, and was happy to see that these subgrids could be seen from the Outlook reading pane, but came to find that subgrids would only show activities directly related to the account (not any created from contacts).
I then created javascript that would change the fetchxml of the subgrid view during the form onload event. This worked good, but the form onload event cannot be called from the Outlook reading pane (no events as far as I could tell).
I then found this article http://blogs.msdn.com/b/crm/archive/2012/04/16/deep-queries-for-subgrids.aspx and it instructs how to do what I need by exporting the unmanaged solution with my account entity and manually edit the customizations.xml file to add the needed link-entity lines to pull in the related activities. I followed the instructions and in the subgrid definition (in the customizations.xml file) I added the 1:N relationship name between the account and contact <RelationshipName>contact_customer_accounts</RelationshipName>, but when I go to the view definition I am not sure what lines I need for the link-entity. I created the following using advanced find.
<link-entity name="activityparty" to="activityid" from="activityid" alias="aa" >
< link-entity name="contact" to="partyid" from="contactid" alias="ab">
< link-entity name="account" to="parentcustomerid" from="accountid" alias="ac">
< /link-entity>
< /link-entity>
< /link-entity>
I need help getting these link-entity lines correct. I need this to return related activities for account that were created directly from an account, or from any associated contacts.
Thanks,
William Mann