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
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.
Receintly I had to create a communication with a company that would return an image after having received certain info.
Now, in order to store the image (wether in the disk or a BLOB field) we cannot just use the “save as” feature
What the web service did was generate the image file, code it into base64 and send the “translated” info. What does this mean? Well, it means receiving a string of text 4.000 characters long. Not as visual as expected…
But let us not lose hope! This rang a bell in my head. I could have sworn I had seen something similar previously in my collection. So after searching through the personal box of code and the internet (a line from here, a line from there…) what I discovered was this: