Posts in Category: data

Fixing Document Management Problems in Dynamics365 and SharePoint

I’ve been working with a customer doing some SharePoint integration with Dynamics365 and when we went to do the first step (which is the simplest) of turning it on.  I then went to access the Document Management section of the Account entity only to find that it was gone and not there.

This was a bummer.

In working to get this back, there are two solutions I looked at, both worked.

Adding the Navigation Link

There is a great article here on how to add the Navigation link back in for Documents.  I had never done this before, so this was interesting to do.  The directions here are straightforward and easy to follow;

https://community.dynamics.com/crm/b/debajitcrm/posts/documents-link-missing-in-navigation-pane-even-after-enabling-document-management-in-dynamics-version-9-0

Adding a Document Viewing pane into a SubGrid on the entity Form

This workaround is a little more involved.  But I have

Read More


JSON Schema Regular Expressions

One of the best parts about the JSON Schema evaluation is the simple use of Regular Expressions to validate your data.  JSON Schema lets you embed any regular expression into the properties that you create using relatively simple syntax.

In this example, I have a property (called record-id) that uses a regular expression to only allow alphabet characters, spaces, underscores and dashes.

              "record-id": {

                "$id": "#/record/record-id",

                "type": "string",

                "title": "A unique identifier, used by the institution to identify the complaint in their source platform.",

                "default": "",

                "maxLength": 100,

                "examples": [

                  "RECORD-12_345 Y"

                ],

                "pattern": "^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9 _-]+$"

              }

What’s great about this is that I can supply defaults and examples to what is being asked, simplifying the task and documentation for the user.

I love this because I’m not an expert at Regular Expression design and if I were to implement this in my own code outside of JSON-Schema – you’re looking at 4 – 5 lines of code on it’s own making my life a lot

Read More


Dynamics365 is Not a Database

Yes, it has a database, more than one to be correct and it has this very cool and fancy thing called CDS which is equally awesome.

But it’s not a database.

Which right now is reminding me of this…

Image result for its not a tumour

As you embark on your next DTS (Digital Transformation Services) project and you decide to move to this new platform, it’s important to remember this concept.

It’s Not a Database.

Even though you can configure it with entities (that look an awful lot like tables) and you can create relationships (that look an awful lot like foreign keys) that have attributes (that look an awful lot like columns).

It’s Not a Database.

Hiring a Database Architect to develop a schema for you in Dynamics will not be as efficient

Read More


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


Connecting to Azure Db via Code

Getting started with a new platform can be a little daunting, after all, there is so much to learn and where do you start.

From a client-side perspective, the only difference in connecting to an Azure Db over a server Db is the connection string.

string connectionstring = "Server=tcp:#SERVER#,1433;Initial Catalog=Signal;PersistSecurityInfo=False;User ID=#USERNAME#;Password=#PASSWORD#;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30";

SqlConnection cn = new SqlConnection();
cn.ConnectionString = connectionstring;

cn.Open();

From there, it’s a simple job of opening a connection, creating a command and querying your data.

The biggest problem I ran into was having to create the firewall rule to allow access (this will not be enabled by default).  Thankfully Visual Studio took care of this, giving me the prompt to do so and quickly enable.

firewall.png

Read More