How To: Try-Catch in C/AL for NAV2016

try_catch_featured_cal
FacebookTwitterGoogle+LinkedInWhatsAppEvernoteShare

Well well well! They finally added this! In a way 😉

As all of you are aware one beautiful thing that a lot of programming languages have is the “Try-Catch” statement. C/AL didn’t have this though. And some people never thought it would.

If you are curious about this and you want to go into more detail I invite you to check Vjeko’s blog entry for more information.

As it happens, Microsoft thought this would be a neat thing to have, and they added a property when defining the functions as follows:

Property Continue reading

How To: Conditional Debugging – Using breakpoints effectively

Featured

The debugging process is for many people one of the most tedious tasks a developer has to do.

Depending on the complexity of the process you are trying to debug, this action can take from a few seconds to a few hours. A few hours of seeing the same lines of code over and over…

If we add to that the fact that some processes are loops and the same code is repeating itself when you only need one of the iterations (the processing of the sales lines when posting the invoice for example), the end result is a very time consuming course of action to follow.

As developers we are often faced with the choice: going with your gut or doing the due diligence and completely debugging the malfunction.

Microsoft knows this and when they can, they add some goodies to help us out as well as heping customers! This is one of them :-) Continue reading

New round of Cumulative Updates fresh from the oven! (aug-15)

update

I know, I’m a little late to post about this but hey, better late than never I say!

So yes, we can find the new updates that Microsoft has made available both on the CustomerSource and the PartnerSource.

As always, before you apply these updates make sure to contact your partner and perform a backup. Data must be protected during changes :-)

For more in detail information please go to the partnersource.

How To: Debug a Webservice/NAS Session in NAV 2013/NAV2015 and above

debugger-featured

Finally! How many hours have I spent debugging sessions without UI with MESSAGEs and ERRORs… The good old days.

If you have done that, like me, then you will probably agree that it was not the most elegant way of finding the source of the problem. Have you ever forgotten to delete a funny MESSAGE after a session debugging with that method and had the client bring it up? I know I have.

In any case, we can finally use the debugger tool incorporated in NAV to debug the sessions without UI. That’s great. And this includes ADCS sessions too!

This is something we have been able to do for a while now, but I did not want to lose the chance of writing a post about it.

How can we do this you might say?

Let’s get to it! Continue reading

Microsoft Dynamics NAV 2016 Roadmap

We finally get some good old powerpoint slides with the info in a official way. You can check the information here: http://aka.ms/navroadmap

Needless to say you will need a partnersource account.

The official slide showing the updates and goodies of NAV2016 is here:

NAV2016 Improvements

What you can see clearly is that their goal is clear: to reach the clouds (get it? the cloud? I was never good with jokes :) ). I was a bit disappointed to learn that the spanish format for electronic invoicing would not be supported though, it’s a shame. Continue reading

Fix Powershell error: System.OutofmemoryException (incl. NAV PSM wrapper)

powershell_featured

It might be that you are trying to execute some large powershell processes and you get this System.OutOfMemoryException error. It happened to me when working with the new (still unreleased) version of This is Merging! for Dynamics NAV.

If you are suffering from the same issue, what Powershell is telling you is that the Powershell session is using more memory than allowed by the system.

And since Waldo released a Powershell Wrapper for NAV (which is what TIM uses) and I was getting this error, I thought it would be interesting to make a quick blog post about it. Continue reading

New round of Cumulative Updates fresh from the oven! (jul-15)

update

The new round of Cumulative Updates for the latest 3 versions of NAV available to date is out finally!
Of course before you implement these updates please try to contact your partner and always perform a backup. You never know what could go wrong :-)

 

For more in detail information please go to the partnersource.

How To: Detect wether a value has been changed by a user or by the system (CurrFieldNo)

featured2

I remember having seen this a while ago somewhere inside NAV but a colleague reminded me of this recently and I thought it’d make for a good post :-)
Let’s get to it.

So yes, there is a way to accomplish this.
As most of us know by now, there are some variables within an object that are predefined for us by the system. Some of this variables can be “CurrPage”, “Rec” or “xRec”.

Well, there is another one a lot of us don’t keep in mind all the time. This variable is named: CurrFieldNo

Continue reading

How To: Test a Dynamics NAV Webservice with Soap UI (free)

Featured_WS

For the last few days I have been working more than usual with Dynamics NAV Webservices in order to make available the business logic to the outside world and allow for external connections. And to do so I needed a trustworthy testing tool.

In my case I have used Soap UI in the past and have had good experiences. So I wanted to create this entry detailing how to test a webservice with this tool :-)

To demonstrate this I have decided to create a new codeunit that has one function alone named “PrintPDFInvoice”. This function prints a PDF of a specific invoice and leaves it in a specific folder.

Continue reading

How To: Execute a Page or a Report using a RecordRef variable

Featured

Before I start, I must say I first read about this on the following Kauffmann’s blog entry. So all kudos to him :-) When I read it I found it really interesting and used it on some of the tools we use internally. So this post will be pretty much my experience with what Kauffmann knowledge :-)

Having said that, let’s get to it!

 

The RecordRef variables are, for many of the developers within the Dynamics NAV community, unknown.

The number of times on which this kind of variables is useful is very limited, and therefore it does not promote its usage or knowledge.

In this post I do not seek to describe them, or how they are used. I might save this for a future entry :-)

 

Recently I found myself needing to execute a page whose ID was dynamic, and the table was dynamic as well.

Continue reading