Posts in Category: sdk

Eliminate Lazy Error Handling

Here is an error I received the other day…

“Authentication Failure”

Here is another…

“Format of the initialization string does not conform to specification starting at index 0, without any typo in connectionString”

And finally my favourite…

“The entity cannot be updated because it is read-only.”

They are all from different applications and implementations and have been my life for the past two days as I tried to figure them out and wasted an insane amount of time trying to figure out what they related to and what I had to do to resolve them.

Here were the resolutions (in order)…

“Multi-Factor authentication is not supported here.”

“You need to enter the string in a special way, but we won’t tell you how.”

“It’s not that the entity was read-only, it’s that a function was trying to modify it while

Read More


Bad SDK Error Messages

I love getting these error messages when using the Dynamics SDK!error.PNG

I immediately know where to go to resolve the problem when it happens 🙁

If you are trying to diagnose precisely where the issue is in your code, the “Reason” member won’t have this data – probably because it’s not at the top of the stack and you need to dig deep to see what’s what.

To get to the nitty gritty of what is happening you will need to dig into the InnerFault of the Detail member to see what has really happened.

Read More


Working with Business Units and the SDK

When deploying solutions, you can’t include Business Units in your solution file and if you are needing to create many of them, this can be a bit of a hassle.

I recently had this problem where I was working on a project that had many units that I didn’t want to create manually, so I turned my eyes to the SDK in order to take this task from 20 minutes to 1.

The Parent Business Unit

The most important thing with Business Units is to remember their hierarchy.  Irrespective of how you have setup your system, you will always have a top-level unit that everything else inherits from.

When trying to find this unit (to then extend from) all you need to do is query for the businessunit that does not have a parent

Read More


Retrieving Configuration Values from the USD

In the USD you can create Options that you can use within your Actions/Events/etc in the Unified Service Desk Configuration.

You can also access these values from within your own control via C# relatively easily.

Capture

To access the value within my USD Custom Hosted Control via C# all that is needed is the following code.

GetConfigurationValue("FoodforThought");

And now I can use this value within the USD without having to create my own configuration files et al in C#.

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