Displaying Lead Activities in Contact's Social Pane - dynamics-crm

In our system, some contacts are linked to the leads later in the process, therefore those contacts don't have the Originating Lead (originatingleadid). Also, we want to connect some contacts to multiple leads.
Currently, we are connecting contacts and leads through the Parent Contact for Lead field (parentcontactid in lead entity).
But the problem is that if the contact does not have an Originating Lead, the activities from the lead are not displayed in the contact's social pane. The relation made through parentcontactid field is ignored.
Is there any workaround for this? Is it possible to make such a relation between the contact and the lead that the activities from the lead are displayed in the contact's social pane?
The originatingleadid field is not valid for update, it can be set only on create.

You can change the Rollup View Relationship Behavior on custom 1:N relationships to Cascade All. In this way the activities from children will be shown on the activity view for the parent.
This would require you to create a custom relationship between Contact and Lead, since you cannot change this property on the standard relationships in the system.
You have not specified a version. The Rollup View Relationship Behavior was added in Dynamics 365 (version 8.2).

Related

Multiselect lookup field in Dynamics

Can I:
make manipulation with subgrid so I can choose multiple Contacts and save them in the field (or even better choose only the email address from the Contacts) or
make a lookup field to Contact that allows me to choose multiple contacts
Longer description of the problem:
I have made some customization of the Invoice entity in Dynamics Sales, but what I also need is an email failed that is a lookup to Contacts, so I can choose a multiple contacts, so later on I can get the email information and send them an email with power automate. But since I'm new to Dynamics I'm not sure how to manipulate with the subgrid, I researched something about creating N:N relationship, but I'm not sure how can I manipulate with on save/ on load events, cause I need to choose multiple contacts and save them in this field.
Customized Invoice Entity

Dynamic parameters for views in Dynamics 365

I have a Account Relationship entity with two lookup fields called Recipient Account and Guide Account. I would like to be able to go on an Account and see all records where the Account Relationship's Recipient Account and Guide Account are set to the account I'm viewing.
In CRM, I can definitely create a view to fetch all account relationships on the Account Relationship entity and then inside the Account entity's form I can include the view with the data source set to Related Records Only and the entity set to Account Relationship (Recipient Account). But I can't do both in a single view.
Through what mechanism can I have it all be in one view? One thing I was considering was creating separate grids, one for Recipient Account and another for Guide Account. But I want to know if there is a mechanism where I can combine all records that have "Recipient Account = Current Account or Guide Account = Current Account" that is basically the query I want to run.
You could use connections. It's pretty flexible and will fulfill your needs as long they stay simple. That's the only viable option I see aside from using two views.
Keep only one subgrid of Account Relationship N:N intersect entity (either Guide account or Recipient account relation)
Register RetrieveMultiple pre-operation plugin to intercept the query & pass the custom fetchxml query by incorporating or filter
Fetchxml has to be built something like explained
Try this unrecommended if you wish but two grids are better choice. This alternate solution also you can try.

CRM 2016 - How to create a parent-child relationship with multiple parent types?

I have an entity - EntityZ, which has a ParentId where ParentId could be EntityA.Id, EntityB.Id or EntityC.Id. Is it possible to create this in MS Dynamics CRM 2016? If yes, how? I've looked but couldn't find a similar question or any help on the web.
An entity can be the child party in only one full parental relationship. When you are looking for a way to cascade record ownership, deletion a.o. between mutiple parent - child entities you can create configurable cascading relationships.
As Arun Vinoth pointed out you can design your entity as an activity type. However, this may conflict with the semantics of activity records in CRM. Also, doing this would make it possible to associate the child entity to any entity that is enabled for activities.
There’s a trade off to achieve this. Custom entity as Custom Activity
Creating custom entity EntityZ as custom activity and EntityA, B, C can act as parent.
EntityA or B or C can be chosen as RegardingObjectId of EntityZ.
This has security limitation like EntityZ will be visible to everyone as this will be listed like other activities (Email, Phonecall, Task, etc)
I think it is worth nothing that Dynamics 365 does contain and out-of-box "polymorphic" customer field.
This field can link to either an Account or Contact:
And while it can be kludgy, another option would be to create 3 lookups and only populate one. Once one is populated you could hide the other two. Or, you could have a "Parent Type" option set to determine which lookup to show.
It would be a bit messy to show three lookups in a view, with only one populated, so you might also want a Parent Name text field in to which you could concatenate the type and name. You could use a workflow to populate it, and then use it in views and reports.

How to show records related to upper records too in a subgrid?

How can I build a subgrid that displays related records both of the current record and records above it, and can it contain complex conditions ?
One of my requirements is this:
I want to put a subgrid in Account form showing the related Contacts of the current Account, and also include the Contacts related to Accounts above the current one if a Two Options attribute of the contact is set to Yes.
Specifically, I'm looking at the Company Name on Contact to establish it's related to an Account.
I'm at a loss and start to doubt it's doable.
Not an out of the box solution but if you don’t mind losing the sub grid command bar functionality you can use the following concept that displays a fetchxml inside a sub-grid.
Step 1 - would be to get all related accounts ids using a fetch or odata
Step 2 - construct a fetchxml with OR filter to get all contacts

CRM 2013 online Subgrid implementation best practice

I'm new to CRM, and am having difficulties implementing a subgrid onto an account form. I am not a programmer.
I will not bore you with the methods that I have tried to so far; that could take a while. Suffice it to say, I am having no luck.
i have created and imported two sets of records from my SQL database. One set was imported into the standard Accounts entity and the other was imported into a custom entity; let's just call that it Problems.
The relationship between Accounts to Problems is one-to-many. Each Account has a "problemID" and each related Problem has a "problemID" as well.
I need to be able to place a subgrid containing all related Problems onto the Accounts forms. I need to be able to see the old ones and create new ones.
How would YOU handle this?
Many thanks!
For a 1:N relationship between Accounts and Problems you only need a lookup to the Account Entity on the Problem entity. Then you can:
Edit the Account Form
Insert a Sub-grid
Set the sub-grid to look to "Only Related Records" for "Problems"

Resources