waldo’s blog

Microsoft Dynamics NAV

Dynamics NAV Source control: iFacto ReVision has been launched!

Actually, this has happened quite some time ago .. but I just didn’t blog about it. Not because I didn’t want you to know, only because I didn’t want things to become too hectic. We released ReVision in Juli with version 1.0.0. A stable release, which was doing the things the tool was intended for: Source Control. Thanks to the feedback of people who were following us, we can say that we have now a tool that does quite some more… . And as we are still getting feedback, the tool keeps on evolving .. Cool :-).

What is the tool all about?

The main function is “Source Control”: the one thing (or should I say “one of the things”) that is missing in C/AL development :-). Our main goal was providing a simple tool that does this, with a minimum change (I dare to say: enhanced) in development experience for the developer. So “Simplicity”, like we know it from NAV itself ;°).

We want to provide this with the simplest license you can find: buy once, use as long as you want: no yearly fee .. because that wouldn’t make sense.

To find out more about this product, you can read lots about it .. but actually the best thing you can do is just download it, request a trial .. and go from there!

Why do I want you to try it out? Because there is just too much to find out:

  • Check Out/In objects
  • Object history
  • Rolling back objects
  • Comparing object
  • Comparing databases
  • Live compile when comparing / editing objects in compare tools
  • Opening clients en connect to database from ReVision
  • Table Info
  • Designer info

And lots and lots more.. .

Where can I find more info on the tool?

I blogged already a few times about this tool:

Together with our website and all other initiatives (now you know where we spent a lot of time in), it explains quite well what you can expect from iFacto ReVision:

Where can I see this tool?

We sponsored already the Decisions Spring event back in June. Very succesful, if I may say. We gained lots of contacts, and quite some customers. But I know, that’s history .. What’s to come.

First of all, we’re gold sponsor ad NAVTechDays. What does that mean? We’ll have a booth where you’ll be able to ask whatever you like about the product, see the product, feel it .. . Second, there is a 15-minute slot that is dedicated on the product on Friday from 12:40 to 12:55. Be sure that you’ll be there!

Next, we will be at Directions US in Orlando as well. We don’t have a booth there, but we’ll bring the product. So don’t hesitate to talk to us and ask about ReVision :-) - I’ll make sure you’ll recognize us :-).

September 14th, 2011 Posted by waldo | Dynamics NAV | no comments

NAVTechDays 2011 - One you should not miss!

At the end of this month - 29th and 30th of September - the first NAVTechDays will be a fact! Actually .. the “first” is may be a littlebit wrong. It’s actually a better name for a conference that was held a few years back: the mibuso conference, which was a celebration of 10 years mibuso, which is, let’s be honest, a life work from a single person, which I’m proud of for being able to call a good friend: Luc Van Dyck.

It’s that same person who is doing something, where others need “teams”, “boards”, “organisations” .. for. Luc is organising an event again, with about the same focus as the mibuso conference, but a much better name: the NAVTechDays. And I’m glad he added a year to the name .. which hopefully means that lots of NAVTechDays will follow this one. Ladies and Gentlemen .. where AX needs its Microsoft, NAV has got his Luc (and the community).. don’t forget to attend, the ..

(for people who are wondering .. no I’m not getting paid for this :-)).

Who should attend?

Well .. the title of the conference is quite self-explanatory: this conference is (and should be) about the technical side of NAV, so consultants, developers, development managers, customers, freelancers, project managers .. be ready to experience lots of technical deep dives regarding NAV (duh..).

Some nice stats

Until now, there are 380 paid attendees + 12 pending attendees. That means: about 400 attendees that are already registered to the event! Pardon me .. but am I mistaken that is going to be one of the biggest - of not THE biggest -conference about Dynamics NAV there is? With such a specific focus (being technical / development), Luc managed to gather about the same amount of people as other conferences. Well .. It’s probably that focus that makes it so interesting, isn’t it .. it’s one-of-a-kind.

These 400 people come from 34 different countries. Here is an overview (which you can find on his site as well):

That’s amazing. All of them will be traveling to Belgium to attend this event. (that’s may be the only disadvantage of this event - I don’t get to travel! ;°) ). These are the Top 5 countries:

  • Netherlands: 96
  • Belgium: 62
  • Germany: 59
  • Denmark: 43
  • United Kingdom: 22

Amongst them .. lots of experts are attending, to name a few:

  • There will be 10 MVP’s there:
    • Alain Krikilion (aka kriki)
    • Mirko Mainetti (aka Belias)
    • Andrey Panko
    • Kamil Sacek (aka kine)
    • Luc Van Dyck (the mibuso-man!)
    • Luc van Vugt
    • Vjekoslav Babić (aka Vjeko)
    • Mark Brummel (did you know he wrote a book? .. ;°) )
    • Jörg Stryk (aka the SQL guru)
    • Eric Wauters (aka waldo - that’s me :-)).
  • Steven Renders: writer of the new book about NAV 2009 Reports
  • Freddy Kristiansen: from the famous blog.
  • Per Mogensen: from mergetool.com .
  • Christian Abeln: Mr. Client Extensibility.

Just to name a few .. I’m not mentioning all of them .. there are 400 interesting people for crying out loud .. don’t let me name them all (just take a look here :-)).

To conclude, the speakers

I will be speaking at the event .. but don’t let that stop you from registring .. because lots of other people who ARE interesting to listen to, are also speaking. Check them out here. These sessions are on the mouthwatering agenda:

  • Administrating NAV ‘7.0′ with Windows PowerShell 2.0
  • Bug-free Development in NAV
  • Developer Tools
  • Form Transformation
  • Integration (CRM connector, Webservices, Windows Phone 7, …)
  • Mergetool
  • .NET and NAV Interop
  • Partner-ready Software: how to build software for others to maintain
  • Reporting story in NAV ‘7.0′ and additional possibilities for data retrieval
  • RoleTailored Client Add-ins, Visualization & Charting
  • Tools & tricks that make NAV development easier and more organized
  • Understanding Keys & Indexes with Dynamics NAV & SQL Server

It’s just not right not to come.

C U there!

Â
 

September 8th, 2011 Posted by waldo | Dynamics NAV | no comments

Jet Report Express is LIVE

From September 1st, Jet Reports Express is LIVE. It has been announced before that Microsoft was working on a collaboration with Jet Reports to provide a tool that enables you to create powerful reports using Microsoft Dynamics NAV data from within the familiar environment of Microsoft Excel.

There is lots to find on partnersource:

Marketing material:

Getting started material:

Get Busy & Good luck!

Â
 

Â
 

Â
 

Â
 

Â
 

September 5th, 2011 Posted by waldo | Dynamics NAV | one comment

.NET Interop: Calling Stored Procedures on SQL Server (Example 2)

What am I trying to do here .. well, I’m working on three examples on how to call stored procedures, and where it could be useful for. The first blog article was about the first example, and also explained some basics. Therefore I strongly recommend to read that one, before you continue on this article. These will be the examples that I will be talking about:

This being the blogpost of example 2, we’ll talk about composing a SQL SELECT string. In fact, what I’ll try to do is:

  • I’ll provide an “Item No.” as the input parameter of my Stored Procedure,
  • I’ll compose a UNION-type of SQL String that is going to get the data from the views from my previous examples, DISTINCTed on a few fields..
  • I’ll call that SP in NAV, put the results into a TempTable, and show it to the user.

As you can see .. I tried to do a lot of SQL stuff, which is not really easy to do in NAV (unions, distincts and views.. ). And I won’t lie, also this example is based on the examples I did for the ADO-post, which you can find here. I’m just trying to put that in decent .Net Interop usage.. :-).

Enough bla-bla, let’s boom-boom!

My SP looks something like this (I added some comments to make things clearer):

ALTER
PROCEDURE [dbo].[SP_LoadInventory]
@ItemNo AS
VARCHAR(20)

AS  
BEGIN

SET
NOCOUNT
ON;

DECLARE @CompanyName VARCHAR(30)

DECLARE @OrigCompanyName VARCHAR(30)

DECLARE @SQLString NVARCHAR(MAX)

DECLARE @Counter INT

 
DECLARE curCompany CURSOR
FOR
SELECT [Name] as CompanyName from dbo.Company
OPEN curCompany

SET @Counter = 0
SET @SQLString=”

 
FETCH
NEXT
FROM curCompany INTO @CompanyName
– Begin looping all companies in the database
 
WHILE
@@FETCH_STATUS
= 0
BEGIN

– Converting the wonderful NAV-supported-but-best-not-used-in-SQL characters
SET @OrigCompanyName = @CompanyName
SET @CompanyName =
REPLACE(@CompanyName,’.',’_');

SET @CompanyName =
REPLACE(@CompanyName,’”‘,’_');

SET @CompanyName =
REPLACE(@CompanyName,’\',’_');

SET @CompanyName =
REPLACE(@CompanyName,’/',’_');

SET @CompanyName =
REPLACE(@CompanyName,””,’_');

 
– Only put the UNION in between of two SELECT statements
IF @Counter > 0
BEGIN

SET @SQLString = @SQLString + ‘UNION’

END

SET @SQLString = @SQLString +


SELECT DISTINCT ”’
+ @OrigCompanyName +
”’ AS CompanyName,ItemNo, LocationCode, LocationName
FROM dbo.[’
+ @CompanyName +
‘$SP_ItemLocation] a
WHERE ItemNo = ”’
+ @ItemNo +
”’


FETCH
NEXT
FROM curCompany INTO @CompanyName
 
SET @Counter = @Counter + 1
 
END;

 
print @SQLString — to make it easier to debug
 
EXEC
sp_executesql
@SQLString
 
CLOSE curCompany
DEALLOCATE curCompany
 
END

As you can see, it’s going to UNION the results I’m getting from the SELECTs on the Company-specific views I created in my previous post. This for all companies, no matter how many companies I have in my database.. . Quite generic, no configuration required. Thank you SQL Server! [;)].

As this SP is going to give us a table, we’re going to try to present that table in a page, with this code

… <Open your connection here>

SQLCommand := SQLCommand.SqlCommand(); //Constructor
SQLCommand.CommandText := ‘SP_LoadInventory’;
SQLCommand.Connection := SQLConnection;
SQLCommand.CommandType := GetEnum(SQLCommand.CommandType,’StoredProcedure’);
SQLCommand.CommandTimeout := 0;

SQLParameter := SQLParameter.SqlParameter;
SQLParameter.ParameterName := ‘@ItemNo’; //Name of the parameter
SQLParameter.SqlDbType := GetEnum(SQLParameter.SqlDbType,’VarChar’);
SQLParameter.Direction := GetEnum(SQLParameter.Direction,’Input’);
SQLParameter.Size := 20; //20 characters
SQLParameter.Value:=ItemNoVariable;

SQLCommand.Parameters.Add(SQLParameter);

SQLReader := SQLCommand.ExecuteReader;

WHILE SQLReader.Read DO BEGIN
GlobalInventoryBuffer.INIT;
GlobalInventoryBuffer.”Item No.” := SQLReader.Item(’ItemNo’);
GlobalInventoryBuffer.”Company Name” := SQLReader.Item(’CompanyName’);
GlobalInventoryBuffer.”Location Code” := SQLReader.Item(’LocationCode’);
GlobalInventoryBuffer.”Location Name” := SQLReader.Item(’LocationName’);
GlobalInventoryBuffer.INSERT;
END;

PAGE.RUN(PAGE::”Global Inventory Overview”, GlobalInventoryBuffer);

… <Close your connection here>

This is quite a difference with the ADO automation version, isn’t it? Well, it makes sense to use the datareader (as that’s all we want to do here). It gives us a clean an nice way to read our resultset. The SQL Reader is a DotNet variable of: ‘System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.System.Data.SqlClient.SqlDataReader

That’s all for example 2. I don’t state this example is a “useful” example, but it shows you can combine the “power of SQL Server ” (views, any SELECT statement, …) with NAV quite easily. And now you can do it by using the .Net framework!

September 1st, 2011 Posted by waldo | Dynamics NAV | one comment