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

    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


Using the Solution Checker

When building new solutions with PowerApps (and now that Microsoft is strongly encouraging people to push solution infrastructure and usage to the new PowerApps model) you can now take advantage of the Solution Checker.

The Solution Checker is available from the main solution window and allows an administrator to validate a solution before exporting it and avoiding the whole conversations of “but you told me it was done?” that can sometimes happen with Dynamics.

sol.png

After you run the checker against your solution you are then able to view the results and identify what needs to be fixed (if anything) before

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


Calling your HTTPTrigger

After you deploy your first HTTP Trigger function, the first thing you are going to want to do is call it.

(And why not).

However, how you call it at what URL you use are not as straightforward as you might think.

To find the URL that will trigger your app, navigate into the function itself and look for the (very, very small) link that says “< /> Get function URL

When opened, this will give you the URL that you can use to call your function. Simply “copy” the URL and you’ll be good to go.

Read More