How to Use the Dynamics365 Platform

Generally, when starting a conversation with a new customer about moving to Dynamics365, the first statement they always make is…

We don’t want to change anything and we want to use it as is.

Which runs completely counter to the inherent capabilities of this platform at large not too mention what their requirements are and what they want to achieve.

I get it – you bought a car – you love it, it does almost everything you want to do so you don’t want to change it, but guess what, if you want to keep using it for life and get the most out of it, you’re going to have to make some changes.

Same with Dynamics365, with this in mind, I put together the following diagram that I hope will help new customers

Read More


Azure Functions Local File Logging

In case you don’t know (I had no idea), here it is – the location of your log files when using the ILogger interface for Azure Functions.

%temp%\LogFiles\Application\Functions

Once there, you will be able to drill into your functions by name and find the log file(s) associated with that function.

logfiles

It’s also good practice to enable local file logging in your host.json file using the following syntax.

  "logging": {
    "fileLoggingMode": "always"
  }

Read More


Comments = Good

In case you were unsure about whether or not you should be doing comments in your JavaScript, C#, SQL or Powershell Scripts or anything else for that matter, let me help you out – Comments are good, you need to do them, there is no excuse for not doing them.

You don’t need to be overly verbose in what you write in you comments going into major/minor versions, date of creation, what the weather was, etc, etc, you do need to find a format that accomplishes one goal…

Communicate the purpose of what you are doing.

Many times I have heard the following responses;

  • If they don’t understand it, they shouldn’t be working on it.
  • I speak differently than most.
  • My code is written in a way that it speaks for itself and doesn’t

    Read More


Updating Data with Dynamics Web Api

When working with data via the Dynamics Web API, at some point you are going to want to update your data.

To accomplish this you will need to construct your entity in the same way you did for the insert only now you will use the Patch verb in submitting data to Dynamics.

My original entity code (the data I am updating) will look something like this.

JObject recordToUpdate = new JObject();
string entityFormat = “contacts(” + ContactId.AsQueryId() + “)”;
recordToUpdate[“my_customfield”] = “Some Data”;

Notes:

  • You must use the plural of the entity that you are submitting to the service (in this case contacts).
  • The Guid that you submit, cannot have the curly braces on either side.  For me, I created an Extension method that clears this out relatively easily.  This is the record we are looking

    Read More


Dynamics Web API MaxPageSize vs Top

When limiting the result sets that you work within Dynamics it is important to understand the distinction between Top and MaxPageSize.

Top

If you are trying to limit the number of records you return within a call, you can use Top in your query to tell the system that you only want that specific, total number of results returned.

The syntax for this very straight forward and only involves appending “&$top=100” to your query where 100 is the total number of results we want to have returned to us.

MaxPageSize

Within that limited record result set, we can also specify the page size to be returned to us to handle those records.  For instance, if I were to limit my total results to 2,500 contacts (when 50,000 exist in the system), I could implement a

Read More