Tips & Tricks

MP900406779[1]Have you ever needed to connect to the Web services of one NAV instance from another one? If so, I bet that the approach was something like this: you created a .NET class where you defined a Web or Service reference to the target instance, and then you consumed that .NET class using .NET Framework interoperability. It was kind of clumsy, inflexible, but it worked.

How cool would it be if you could do something like this:

WITH WebService DO BEGIN
  CONNECT(‘http://localhost:7047/DynamicsNAV70/WS/CRONUS%20International%20Ltd/Page/Customer’);

  INIT;
  SETVALUE(‘Name’,'Test Customer’);
  SETVALUE(‘Blocked’,Cust.Blocked::Ship);
  SETVALUE(‘Credit_Limit_LCY’,10000);
  CREATE;

  MESSAGE(‘I just created Customer No. %1 in another NAV instance.’,GETVALUE(‘No’));
END;

[click to continue reading…]

{ 20 comments }

The Beauty and The Beast: NAV and .NET

by Vjekoslav Babic on September 30, 2011

imageIf there wasn’t one already, someone should have invented Belgium. There are two things in this world that I love, and probably shouldn’t (and an oversized red speaker’s shirt I got from Luc today did a darned god job at concealing the unlucky consequences of overly indulging in both of them): beer and chocolate. Boy, do Belgians know their beer and chocolate!

But they know their NAV, too, and after NAV TechDays 2011, which have just ended in Antwerp, and two days of top NAV content, I can only say – great job, Luc and the team, and please make it a tradition.

If you attended my presentation about .NET interoperability, then there are a couple of demos I couldn’t deliver due to time constraints, and I promised to blog it. So, here we go.

It’s about streams. You already know that in NAV there are two data types, InStream and OutStream, that allow you to stream data in and out of generic sources or destinations. They are a fantastic tool, because they require you to know nothing about the type of source or destination, and you can store and retrieve data without having to care if the data comes from Internet, or a BLOB field, or is it written to a file, or transported over an XMLport. Stream makes it abstract and allows you to simply handle the data, and make the object itself care about the specifics.

[click to continue reading…]

{ 18 comments }

Strange errors in RoleTailored Client RDLC reports

by Vjekoslav Babic on September 11, 2010

olddogWe old dogs really have to learn new tricks with RTC (RoleTailored Client), as I found out couple of days ago. A customer of mine asked me for a quick report. I don’t typically do reports, but I thought—“not a big deal, it’s just a report”—so I fixed it, tested it, made sure it worked, then deployed it to production.

And then I found out it was not just a report.

It just didn’t want to execute in production. Whatever I did I just got a strange error message, something I never saw before. Ever.

[click to continue reading…]

{ 3 comments }

Read-only user role in Microsoft Dynamics NAV

by Vjekoslav Babic on September 7, 2010

image Microsoft Dynamics NAV comes packed with a set of predefined roles for many tasks such as editing or posting journals, creating sales orders, editing fixed assets, etc. It also comes packed with a SUPER role, which can do just about anything it wants.

There are two problems with the SUPER role. They are kind of pretty much entangled together.

The first one is—SUPER can do just about anything it wants (um, did I say that already?). The second one is—there are far more super users out in the wild than there should be. Is this your experience, too?

[click to continue reading…]

{ 2 comments }

Abusing filtering for a lightning fast posting setup

by Vjekoslav Babic on September 3, 2010

Microsoft Dynamics NAV Classic client has some features which are simply unbeatable when it comes to productivity and speed, one of them being primary-key filtering. When you set a single-value filter on primary key fields in a table, and then insert a new record in the same table, primary key fields are automatically populated with values from the filter.

Yeah, and?

Well, there are so many ways to (ab)use this feature, that sometimes it has a potential to save ridiculous amounts of time. As it just did for me, so I felt an irresistible urge to share it with you. Even though it is so ridiculously simple.

[click to continue reading…]

{ 2 comments }

Van Vugt’s dynamiXs

April 11, 2010

A year ago I used to run a monthly roundup of NAV blogs and give you a short gist of who said what. Then I got lazy and stopped blogging on the weekly basis, and boy what a mistake I did – because some nice new blogs appeared in the meantime. I am somewhat ashamed [...]

[click to continue reading…]

Tip: Microsoft Dynamics NAV 2009 code page validation

March 31, 2009

This is bazillionth time that I’ve encountered this issue, so I’ve decided to post a solution to it. If you live in a country which doesn’t have Microsoft Dynamics NAV 2009 localized version yet, you might have tried installing the W1 (worldwide, English, non-localized) version. Did it work out? If you install the NAV 2009 [...]

[click to continue reading…]

Printing NAV reports in different languages

March 6, 2009

Last week I delivered the C/SIDE Development course for partner community in Zagreb. As always, questions abound afterwards. Today, I’ve got a question from an attendee: “What’s the best way to print a report in multiple languages?”. Up front: this is NOT a technical post. It IS about technical solution, but it is primarily about [...]

[click to continue reading…]

Featuritis Cure

October 24, 2008

Don’t you just love when users come up with new feature ideas at a microprocessor clock rate. Even before you finish developing one, five new requests pop up. This is a disease, and it’s called featuritis!

[click to continue reading…]

NeverENDing story

September 10, 2008

Hint: this is a post for developers, and mostly junior developers, those who are still learning how to code properly. I know, I promised not to blog about stuff like this, but I simply couldn’t help this time. A friend of mine has asked me for help. “There is this C/AL function I had to rewrite, now I [...]

[click to continue reading…]

Automated Version Management 2.0 – An Update

August 28, 2008

[Updated] I had to update this post a little bit, see below for the details, but the killer feature had to go [/Updated] Remeber that tool “Automated Version Management” that I published here and on Mibuso five months ago? It has just got an update: version 2.0.

[click to continue reading…]