Calculated Column inside Plugin? – Dataverse / Dynamics 365


Recently while working on a plugin, we realized that for a particular column, we were not getting value in the context (on Post Create), the same was the case for Post Update and Post Image.

Also using Retrieve and RetrieveMultipleto fetch its value inside the Plugin didn’t work

Eventually, we realized it was a calculated column, which doesn’t give value inside the Plugin.

If we do RetrieveMultiple and RetrieveMultiple from a console app, outside Plugin, we get the value for that field.

Hope it helps..

 

Advertisements
Advertisement

Unable to install the Profiler. Unhandled Exception: System.InvalidCastException: Unable to cast object of type ‘Microsoft.Xrm.Sdk.Entity’ to type ‘CrmSdk.PluginType’ in Dynamics 365 / Dataverse


We might get the below error while trying to install the profiler in the Plugin Registration Tool.

“Unable to Install the profiler”

“Unhandled Exception: System.InvalidCastException: Unable to cast object of type ‘Microsoft.Xrm.Sdk.Entity’ to type ‘CrmSdk.PluginType’. at Microsoft.Crm.Tools.Libraries.OrganizationHelper.InstallProfiler(CrmOrganization org, String prtPath) at Microsoft.Crm.Tools.PluginRegistration.OrganizationControlViewModel.<>c__DisplayClass302_0.<InstallProfiler_Clicked>b__2(Object o, DoWorkEventArgs e)”

On closing the window we will get the below message “Profiler install failed”

Well we can ignore this error, just click on Refresh

After the refresh is completed,

we can see that the profiler has got installed successfully, even though we got the error.

Hope it helps..

 

Advertisements

Plugin registration profile record not getting created – Dataverse / Dynamics 365


Recently while trying to debug a plugin with Persist to Entity mode on the update step, we didn’t find any profile record getting created.

One option is to try to reinstall the profiler. This could happen when we are using a different version of the plugin registration tool and it has the Profiler already installed/configured from the other version of the tool.

If that doesn’t help, then opt for Exception mode, that has always worked.

Hope it helps..

Advertisements

How to – enable marketing interactions in lead and contact timeline – Dynamics 365 Marketing


To view marketing interactions, we need to add a custom connector to the timeline of the lead and the contact form. This step is only required if we are using custom forms and not the out-the-box marketing forms for lead and contact.

The OOB Form already has this connector defined.

Open the form for customization, select the timeline control, scroll down to Advanced >> Additional Settings >> Custom connectors, and click on Add connector.

Specify Constructor and Resource Path and save the record.

  • Constructor: msdynmkt_DynamicsMktTimelineInteractionAnalytics.TimelineInteractionAnalyticsResource
  • Resource path: msdynmkt_DynamicsMktTimelineInteractionAnalytics

Save the form and publish it.

We can see the marketing interactions being displayed in the timeline.

Hope it helps..

Advertisements

Use Command checker (ribbondebug=true) to identify the Ribbon Customizations Issue – Dataverse / Dynamics 365


Appending ribbondebug=true to the record’s URL adds the new Command checker button in the command bar, which could help us in troubleshooting any unexpected behavior with ribbon.

More on this – https://powerapps.microsoft.com/en-us/blog/introducing-command-checker-for-model-app-ribbons/

Recently we added one enable rule to an existing button (Go Live) in the Customer Journey table. The rule was calling a JavaScript web resource based on the security role assigned to the user hiding or showing the button on the form.

Click on the Command checker to open the window on the side pane, where we can then select our button.

In the command properties tab, we can see our custom enable rule showing an error.

Also here clicking in View rule definition solution layers provides us the detail that this rule has been added as part of an unmanaged layer.

Clicking on the Unmanaged layer further provides us with the definition of the enable rule.

Going back to the error, we figured out that the function was missing from the web resource, and adding the function fixed the issue for us.

Back in the Command checker, we can see the custom Enable Rule getting evaluated correctly.

Check the Troubleshooting Guide

Hope it helps..

Advertisements

Fixed – The product cannot be added because it is not active while creating Quote Product – Dynamics 365 / Dataverse


We got the below error while trying to create a quote product programmatically.

As the error message specifies, this is because we are trying to add/associate a DRAFT product to the Quote Product.

We will get a similar error from the application as well if we try adding a draft product as an existing product to either a quote product or an opportunity product.

Below is the product in the Draft status.

Publish the product to make it Active.

Hope it helps..

 

Advertisements
%d bloggers like this: