Execute a PATCH call from an Extension by using AL and HttpClient

Stefano Demiliani

If you work with REST APIs, you already know that you’ve two HTTP methods for updating resources:

  • PUT: updates an entire resource
  • PATCH: the update request only needs to contain the changes to the resource, not the complete resource.

The AL language permits you to work with REST services by using the HttpClientclass. If you declare an HttpClient object in AL, from Intellisense in Visual Studio Code you can see that you have the following methods for working with resources:

HTTPClientPatch_01.jpg

Where is Patch?? How can I perform a Patch REST call? Is this not supported?

The answer is no, the solution to perform a Patch request is just a bit hidden (don’t ask me why 🙂 ). Here is how you can send a Patch request to a REST resource from AL:

HTTPClientPatch_02.jpg

The key here is to add a PATCH method to the HttpRequestMessage object and then calling the

View original post 9 more words

Dynamics 365 Business Central October release

Totovic Dynamics Blog

Long time no see. I’m currently on vacation and finally found some time for writing. I don’t know if you already read Business Applications Release Notes – October ’18. If you are, don’t read this article :). But if you didn’t already read, you can get some basic overview what we will get in October.

First one technical news, from October we can use Business Central, on-cloud, on-prem and in hybrid deployments. And even more, you can use existing Dynamics NAV on-prem solution in hybrid model connecting to the cloud through Business Central. In both of cases, using Business Central or NAV on-prem, you can have your tenant on a cloud, where your data will be replicated. If you decide in one moment to continue only with cloud, it will be very easy task for you. But it is important to know, in this scenario you need to…

View original post 514 more words

Three ways to use extension data in C/Side

Red and Bundle

So, I get it now. We need to develop in extensions. Nothing but extensions. We need to tell our employers to forget about new requirements for half a year and ignore bugs while we developers lock ourselves in the basement and rework our existing code to an extension. Right?

Well, locking developers in a basement will probably appeal to a fair number of managers. Not developing new requirements or fixing bugs for said amount of time will definitely not. Like it or not, many of us face working with hybrid systems.

Where I work we now have extensions in a heavily modified C/Side code base. So when my Colleague phoned me a while back to ask me how in hell he could get a field from our extension onto a C/Side report I had to put my thinking cap on.

So far I came up with three workable methods of…

View original post 347 more words

Converting an ISV solution to an extension: Update 1

Great start. I fortunately had only 400+ errors on my 1.800 objects. Share your experiences!

NAV Bits and Bytes

Well, what can I say……….this is going to take a while. 🙂

If you have no idea what I am talking about, start here.

After getting the objects converted to AL (using the standard process documented here), I was immediately greeted in VS Code by just over 8000 errors/warnings. Great start.

Luckily half of those were generated by the code analyzers. If you don’t know what they are, see here. Yes, at this point in the project I am considering that half of my issues are “only non-standard and poorly formatted code”. Gotta try and stay positive!

This brings me to my first “recommendation” in this process:

Turn off ALL the code analyzers.

The code analyzers are enabled by default, but can be turned off in your VS Code settings (see here). Once I get to a point where the “non-syntax” errors have been addressed, I…

View original post 250 more words

Converting an ISV solution to an extension: The Beginning

Let’s start converting our ISV solutions!

NAV Bits and Bytes

I’ve been a bit neglectful of this blog for the past couple of months, but with good reason. I’ve been jumping around multiple projects, and have now landed on a project that will involve taking a roughly 3000 object ISV solution and converting it to an extension.

Easy task? Far from it.
Challenging? Most definitely……but that’s why we do what we do right!?
Will I be able to convert it all to an extension? Not likely. (Yes, extensions still have limitations)

What I want to do is post my journey through this project. It’s not going to be a step by step of what to do as this is the first time I’m doing this. Up to this point, my extension experience was building them from scratch, or taking small pieces of existing features and recreating them as extensions. Nothing on this level yet. In all likelihood, I will make…

View original post 314 more words

Record Zoom Extension

Cool Extension!

Marcellus' Blog

I think we all like the Zooming in the classic client and the Help/ About This Page in the Role Tailored client. This extension I created can be easily added to any page that displays records from the database and it will show all fields included in the source table. The source code is available on Github.

View original post 150 more words

Extending Role Centers

Today I wanted to extend a Role Center with a Page Extension and I noticed Microsoft has updated terminology.

HomeItems = Embedding

To add a list to the Home Items you must use Embedding.RC1

Other changes:

  • Related Information = Navigation
  • New = Creation.

RC2

The Result in the Windows Client is the normal behavior with grouping the Cue from the Activities which in this case was also created using a Table Extension and a Page Extension.

RC3

Great Job guys!