Error logging for Microsoft Dynamics Portals

By | August 6, 2018

 

Just got some time over the weekend to look into the error logging feature for the portals – it was introduced a while ago, so, if you have not seen the documentation yet, have a look:

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/view-portal-error-log

This turned out to be a mixed experience, although, it’s certainly better to have logging than not to have it.

Basically, there are two different features:

  • There is server-side error logging
  • And there is this new ability to display plugin/workflow errors right on the portal

As of this moment, here is what you may expect when using that functionality:

1. Server side error logging

One thing to keep in mind when setting up the connection is that you need to copy connection string from the blob settings in your Azure portal:

image

If you make a mistake there, portal configuration screen will be asking you for the valid URL. Which is a bit misleading – it really needs the connection string from the screen above:

image

  • BTW, just in case it matters, you can use any Azure tenant for the blob.

Once it’s all been setup, you can see error logs in the Storage Explorer right in the Azure Portal:

image

I am not sure why there are two folders, so try both.. There are subfolders organized by month/day, but, in the end, you’ll find a CSV file:

image

Download the CSV, and you’ll the errors. For some reason, there will be other errors in the logs (for the lack of better word, I’ll call them “system errors” for now.. most of them seem to be some kind of file system “access denied”), but, among those errors, you’ll see the one produced by your real-time worklfows/plugins, for example:

image

2. Client-side error notifications

This is where we should be able to create a new site setting ( Site/EnableCustomPluginError ) to see a friendly error message when an error happens in a plugin:

image

This has not worked out for me, yet, even with the site settings added/configured, so it might not be working in my version of the portals (9.0.6.1). Still, it’s probably going to be even more useful than server side logging since, out of a sudden, we are getting a simple solution for communicating server-side business logic validation errors to the portal users.

2 thoughts on “Error logging for Microsoft Dynamics Portals

  1. Arsenico Neckebroeck

    Hi Alex,

    I can confirm that adding this site setting and setting it to ‘true’ on a 9.0.7.22 portal does work. I don’t know exactly how the upgrading works, but you could consider it to upgrade.

    Reply
    1. Alex Shlega Post author

      Hi Arsenico,

      thanks for the info. Wondering if resetting the portal would help – will try (had a support ticket with Microsoft, they basically said the issue was fixed but my portal instance would need an upgrade, so I’d have to wait till that happens)

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *