by Vjekoslav Babic on September 30, 2012
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…]
by Vjekoslav Babic on September 30, 2011

If 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…]
by Vjekoslav Babic on September 11, 2010
We 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…]
by Vjekoslav Babic on September 7, 2010
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…]
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…]