Azure Function Publish Failed

I had a few instances last week where I was getting this incredibly descriptive error message. When I dug into the logs, I got an even more descript messaging saying that “Publishing had failed.”

Both lead me nowhere and after deleting publishing profiles, pulling them down, pushing them back, doing whatever I could, nothing seemed to function.

Cue finding out about this key in on my function itself – WEBSITE_RUN_FROM_PACKAGE 

By default, when you create your function in Azure, this is set to 1. However, for Web Deploy to work (i.e., from Visual Studio), this needs to be set to 0.

Once I did that, boom, publishing was working solidly like a rock once

Read More


Geocoding with Dynamics

I’ve been working on a few projects the last little while that has involved leveraging Geocoding services to augment address data stored in Dynamics.  Where I previously thought that all Geocoding services are created equal, I was quick to learn that they are not and you should definitely do your due diligence in looking into what service you use.

This is an important piece as well, we were focused on using services only and not buying data that needed to be updated every quarter.  Many of the services out there give you a free stack of geocoding requests (based on what you’re doing) that you can most likely throttle down your daily limits and/or take the hit on.

What I found most interesting was to see which platforms had access to which

Read More


Finding your Azure Tenant Id

If you’re connecting with the Dynamics Web API in a Function or Service, you need to know your Azure Tenant Id.  If you don’t have a custom domain, this is relatively simple, but if you do have a custom domain, it can be slightly obscured and/or completely hidden from what you are doing.

To find you Tenant Id, simply go to the Azure Active Directory, scroll down to Custom Domains and look for the domain that looks something like xxxxxxxx.onmicrosoft.com.

aad.PNG

That will be thetenant id that you will want to connect with, not your custom domain name.

Read More


Debugging Azure Functions Locally

If you’re storing configuration keys in Azure Functions, there is this really cool facility called Application Settings where you can create all these keys and access them when your function runs.

HOWEVER, when running your Azure Function locally, these keys do not automatically download and you need to add them into your local.settings.json file for them to be consumed.

After you have done this, next you need to make sure that this file is set to “Copy if newer” because if it isn’t you’ll never get to consume those values.

I ran into the above very innocently by trying to troubleshoot the granddaddy of all problems – why my AzureWebJobsStorage parameter was empty and I was not able to download what I needed from my Azure portal into it.

Amateur Tip: If this value

Read More


Database Errors on Restore into v9

If you’re getting ready to perform an on-premise update by importing new organizations into your existing tenant you might start to get some cryptic database errors on constraints.

The constraints themselves vary, mine was in reference to cndx_PrimaryKey_DiscountType, others I’ve seen were in relation to opportunities.

Whatever the error, you will need to install the 0.3 update to address and fix the issue so you can import the tenant.

When you install the server, this update is not applied by “Getting updates”.

The link to the patch is located here – https://support.microsoft.com/en-us/help/4490599/service-update-0-3-for-microsoft-dynamics-365-9-0 – once done, your upgrade and import will succeed.

Read More