Keeping your Dynamics365 Audit Logs Tidy

Audits are a great way to see what has happened on records, what they did and more importantly who did it.

But if you have automated processes running that are pumping data into Dynamics because a field or two has changed, you might end up with an Audit History looking something like this.

In this case, an update was triggered, but it wasn’t until the fourth update that there was an actual difference in the data being changed.  Even then, when we sent the whole packet of data, we sent it all.

With only four feels you can already see this gets a little painful to follow.

Capture.PNGRead More


Advanced Code Tasks with the Package Deployer

Running simple, one-hit code tasks in the Package Deployer is pretty easy and works when you have one or two projects that you are working on.

However, I’m pretty lazy and not much for running the same patterns over and over again.

To this end, I came up with a Framework that requires you to only code your Package once while letting you maintain your tasks in another project that you don’t need to reference directly.

The implementation is accomplished via an Interface library that gets shared between projects.  In this case, I called it “IDeploymentTask” and gave it some property and events to be used while it does it work so it can update the UI accordingly.  This interface is located in a common project that both my Package Deployer users

Read More


Accessing Data with LiteDb

In my last post I talked about how easy it was to create a database with LiteDb.

But accessing your data is even easier.

To start off, assuming we have no document (i.e., structure) associated with our data – we can create a generic table on the fly using the built in BSonDocument structure.

In this example, I first use my database to get a collection of documents under “FirstTable”.  If it’s your first time creating this document, don’t worry, it’ll be created for you, so no need to do any “CREATE” mumbo jumbo.

var FirstTable = database.GetCollection("FirstTable");

Now I’m going to create some data.  The simplest, most brain-dead way to do this is to create a Dictionary, make some columns and give them whatever values I want that are of type BsonValue

Dictionary<string, BsonValue> docs															

Read More


Getting Started with LiteDB

Every project you do will have data and eventually you’re going to need to store that data somewhere.

And config files are such a pain to manage (and also so early 2000s) so as much as possible I try to use a database or some unit of storage.

And like anything you build, once you start building it, it takes on a life of it’s own that you twist and turn and wrench into something useful until one day you look at it and go – maybe storing our configuration in a 25,000 line XML file wasn’t the best idea?

So if it’s going to be a bad idea down the road, why not start doing the right thing from the get go – enter LiteDb.

LiteDb is an incredibly easy to use,

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