Dynamics NAV SCM in Visual Studio Code

Ever since last year I have wanted to do something inside Visual Studio Code for Source Code Management of Standard Dynamics NAV development.

Why? (You might ask.)

Well Microsoft has introduced Visual Studio Code as the next generation editor at several conferences in 2016. Creating tools in Visual Studio Code that can help manage your Source Code for the existing version might help migrate developers to Visual Studio Code and get use to it before the next version is released.

That said I have also been looking at how to make the entry in to Source Code Management as easy as possible. Many developers are still not using any kind of SCM, something I really have wanted to change for several years, and I think the main reason is the knowledge and time to get started and get setup is just too high. Developers simply give up before they get started.

So what to do about it?

In the last months I got talking to a few developers at Elbek & Vejrup in Denmark that were looking to explore SCM and get their teams up to speed. We discussed the options and we agreed on VS Code as the way forward.

This project has been underway for a while now and we are almost ready to release version 1.

If you are interested in reading about it, contributing or following please feel free to follow the project hosted by my friends at Cloud Ready Software on GitHub

https://github.com/CloudReadySoftware/DynamicsNAVSCM

You can also install and play with what is already there by installing the following extension for Visual Studio Code.

https://marketplace.visualstudio.com/items?itemName=cloudreadysoftware.dynamics-nav-scm

When done we hope you just need to install VS Code and the extension and with minimal knowledge of Source Code Management you are up and running with your Code in place in a Git Repository.

We look forward to every ones contributions.

Happy Code. Safe Code.

 

 

Moving to WordPress

So it happened. I moved my blog to WordPress. Not that I did not like Office 365’s public site and all the great options that it gave me. Quite the opposite. The simple fact is that Microsoft is about to retire this option, so I just need to get it done before that happens.

I hope you will continue to enjoy my blog.

 

Get Currency Exchange from Bank of Canada

Did you get your Currency Exchange Rates from Bank of Canada? The format just changed as of June 1, 2017 and you now need to set it up via the new format.

Go to the Currencies page.

2017-07-02_14-09-28

Click on Exchange Rate Services

Select New and create one with the following settings2017-07-02_18-56-18

Once you have populated the correct URL as seen above you can use the assist button in the Source Field to populate the nodes from the XML file in the lines.

For the Starting date you need to use the “US_DATE_FORMAT” Transformation Rule. If you don’t already have it you can look in a Cronus Database. It is already defined in the demo data.

To get the currency code you need to pick the 3rd to the 6th character from the FXUSDCAD text string. You can see the string when click the Assist button to pick the Node.

2017-07-02_19-05-50

You can do this by creating your own transformation rule looking like this.

2017-07-02_19-08-46

As you can see you can test your transformation rule in the bottom of the page by inserting your text and hitting the update on your right. The result will show in the result field.

The bad thing here is that I did not find a way to import multiple currencies with the new format from the Bank of Canada. It doesn’t look like the functionality supports this new format very well or the format is just a little strange.

If you need to find the exchange rates that works for you, Bank of Canada has a website explaining how their service works.

http://www.bankofcanada.ca/rates/exchange/

Hope this is use full to you all.

 

Running PowerShell from VS Code

Did you know you can run PowerShell from Visual Studio Code?

One of the biggest strength of VS Code is its diversity and the fact it is very light weight. I have already been using VS Code to do a lot of things with Git for a while because it natively integrates nicely with Git which is a huge plus.

Now a while back I tried to use PowerShell with VS Code but it was just not working well at the time, but recently I tried again and things have changed a lot. If you install the PowerShell extension from Microsoft you can now edit and run PowerShell scripts natively inside VS Code just like you can from PowerShell or PowerShell ISE.

You can find the extension here:

https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell

VS Code – One tool to rule them all.

Is My Record Temporary (Part 2)?

Back in July I wrote a blog on how to test if Records are temporary or not.

You can read it here.

Microsoft has now added it so you can directly test if a record is temporary or not with out any extra coding.

You define a record and like “Cust” as a variable of Record based on the Customer table. Now you can write things like.

2017-06-25_14-58-20

Thanks Microsoft. Great to see you implement my suggestions.