Posts in Category: dynamics 365

Understanding Form Types in Dynamics v9

In Dynamics v9, there are four custom form types that you can apply to your entities, all with a variety of features attached to them.  In previous versions there were more types but these have been rolled into these four as part of their usage in Power Apps and the User-Unified Interface.

If you’re new to Dynamics here’s the quick primer on getting started.

Main Form

The main form is strictly what it means, it’s the central form for accessing your entity in the web view across a variety of browsers.  This version of the form has been around for years.

mainform

Quick Create Form

If you want

Read More


Dynamics365 Alternate Keys and UpSert

Using Alternate keys is an easy way to stop doing pre and post checks for whether you can insert data into Dynamics.

Before you had to do a check behind the scenes for whether an “Id” existed and if not go and insert it.

Now using the “Upsert” pattern in Dynamics, you can accomplish this task in one method call using an alternate key.

At’s it’s most simplest implementation, I created a custom entity and a field (wholenumber) that I then declared as my alternate key.

altdesign.PNG

Then I wrote the following code to insert the following record into my system.  You can

Read More


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


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