Use Opportunity and leads in Interactive Service Hub in Dynamics 365

Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com
As a dynamics CRM consultant, you come up with variety of requirements from customers. Some we achieve easily using the OOB ways with some customizations, some others need a complex workaround and then there would be some where we just have to be honest to our client and tell them that the feature they are looking for is currently not available in Dynamics.
And I came across a requirement of the last category from one of our customers very recently. They were using Interactive Service Hub hugely for their service module and their business was just too happy with the Interactive service hub. After all why not? The mobile look & feel, the tile views, the form, all look so nice.
While you get lost in the beauty of ISH, how about this requirement to pull you out of your utopia? “We want to implement ISH for our sales module as well. Opportunities, Leads etc etc”
My first and immediate answer was a big NO. After all Opportunity and lead are OOB entities for which ISH can’t be enabled. The immediate reply from our customer was why? If we can enable complex custom entities for ISH, then why not opportunity?
Could not commit to the customer as this is outside of Microsoft recommendation but I decided to give it a shot. Certainly, it can’t be enabled for Opportunity and Lead from the UI, but hey! what about doing it using SDK. I wrote the below code to enable Opportunity entity for Interactive Service Hub.
RetrieveEntityRequest entRequest = new RetrieveEntityRequest();
entRequest.EntityFilters = Microsoft.Xrm.Sdk.Metadata.EntityFilters.Entity;
entRequest.LogicalName = “opportunity”;

                RetrieveEntityResponse entResponse = (RetrieveEntityResponse)service.Execute(entRequest);
                var entMetadata = entResponse.EntityMetadata;
entMetadata.IsInteractionCentricEnabled = true;

                UpdateEntityRequest updateEntRequest = new UpdateEntityRequest();
updateEntRequest.Entity = entMetadata;

                service.Execute(updateEntRequest);
I ran the code and it much to my surprise, it ran without any errors. So CRM does not stop enabling of ISH for non-listed entities using SDK? Is the restriction only from the UI perspective? Well before jumping to conclusion, let us first check if the flag really got enabled.
I went to the Opportunity entity customization and below is what I could see.
image
Cool! the box is checked. Means my code has done the wonders.
But wait, does making this field enabled really work. So let’s find out.
I first created a Interactive experience form for Opportunity. In am not going to explain here, what is an Interactive Experience form and all. If you are not aware of Interactive Service Hub, I suggest you first get to know about it and then come back to this post.
image
The next I do is design a card form for the Opportunity entity.
image
So far so good! The next I did was create an Interactive Service Dashboard for Opportunity entity.
image
I save and publish all customizations. Now comes the toughest part. I have done all the customizations. But will Interactive Service Hub framework be able to render this. After all Opportunity is not something which is listed in the list of entities for interactive service hub.
I open ISH. And voila! it works. Below are the screenshots of how it looks in ISH.
image
image
image
Awesome. Isn’t it. I have tried this procedure with multiple entities which are not listed and all works great!
I am still to suggest this to customer as this is not something that has been officially recommended by Microsoft. However if you check this, we haven’t done any sort of unsupported customizations.
The question of my customer still comes to my mind with a bit of improvisation. “If ISH can render awesome views even for the entities which are not-listed, what is the main reason behind not exposing these OOB entities directly for ISH?”
Would like to know your views as well.
Hope this helps!
Try our tools
Sharepoint Metadata Manager and Attachment Extractor (http://www.xrmforyou.com/sharepoint-integrator-1.html)
Role Based Views in Dynamics CRM (http://www.xrmforyou.com/role-based-views.html)
Multiselect Picklist Control (http://www.xrmforyou.com/multi-select-picklist.html)
Record Cloner (http://www.xrmforyou.com/record-cloner.html)