Posts in: June, 2018

ASP.NET Web API Usage with Dynamics Web Api

I’ve blogged about connection setup with the Dynamics Web API over the last little while – Getting it Setup and how to use with the USD.

One critical piece that I forgot (or rather overlooked) that needs to be mentioned is what is called the “Headless” connection.  This is a connection to your Dynamics tenant that does not use a Username or Password combination and does not prompt the user to enter in their credentials when accessing.

In my previous examples, my Application type was “native”, however, for this to work in a headless modality in a web api world, this needs to be configured as Web app / API.  If not configured this way, you will always be prompted for access to your Dynamics

Read More


Identifying when a Dynamics Plugin Fires

I recently had a problem where we had multiple events tied to a single plugin (not the perfect architecture, but one I had to work with) on the disassociation of a record from a Many-2-Many grid.

pluginevents.png

The problem with the above implementation is that for each Disassociation even we were registered for both the Pre and Post events (whereas one plugin required both, but another only required the Post event).

To detect which even the plugin was handling I was able to key off the following Input Parameter to what event was firing.

localContext.PluginExecutionContext.InputParameters.Contains("parentExecutionId")

If the “parentExecutionId” variable existed, I was in the Pre-Step and if it did

Read More


Unified Service Desk and the Dynamics Web API

A follow-up to my post on Getting Started with the Dynamics Web API – on a recent project, I was building a custom hosted control in the USD that leveraged the Dynamics Web API.

However, when I went to deploy my control, my USD instance would implode and not load whatsoever.

Turns out the issue was a result of me using a higher version of the Microsoft.IdentityModel.Clients.ActiveDirectory dll (the latest 3.19) than what is supported in the USD (using 2.22).

The resolution was to downgrade my implementation of this dll to use 2.22 et voila, my solution deployed perfectly and my USD was no longer imploding.

I should note that for the above this is all done using v2 of the USD on a Dynamics 8.2 instance.

 

 

Read More