Here's the problem... Tax number for all companies is being changed in Croatia. This means a lot of hassle collecting new tax numbers from your customers, vendors and contact to ensure seamless opereation when it becomes mandatory to use. Specially, tax reporting for December needs to be done using old tax number and you need to start using new in your accounting from 1.1.2010. Nightmare in this holiday time of year you'd like to spend with family and friends. So, I thought, why not using what you already have in Dynamics NAV? RIM's Data migration tools? Style sheet tool?
Some logistics first, before I get started.
Currently, we have 2 versions of Dynamics NAV supported in Croatia (NAV 4.0 SP3 and NAV 5.0 SP1 with Feature Pack 1). Rapid Implementation Methodology Toolkit (RIM Toolkit), which is now part of Sure Step methodology, is localized and available for both of these versions on Dynamics NAV.
From July 2009, RIM Toolkit (part of Sure Step Methodology) is available to all partners, so why not taking advantage of this tool?
For Croatian version of Dynamics NAV 4.0, there was a separate release of localized RIM Toolkit (download link).
Localized RIM toolkit is available as integral part of latest Croatian version of Dynamics NAV release (download link for NAV 5.0 SP1 FP1).
Style Sheet tool is also available for download from this link. I used Style Sheet Tool version 1.1 while preparing this guide.
At the moment new tax number regulations were published (OiB), it seemed to me, users will only have to replace current VAT Registration Number with new tax number Tax Authority will supply them with. Apart from updating their own VAT Registration number, users will have to do this for their master data (Customers, Vendors and Contacts) and open documents (orders, invoices and credit memos) as well. However, from conversations I had with partners, most trouble customers will have will be the transition period where they still need to do reporting with old VAT Registration No, while at the same time create new documents with new tax number, that, as per legislation, has clear usage cut-off date - 1.1.2010.
Handling VAT Registration No update process out of the system should enable users do their day to day business in with no interruptions, keeping their customer, vendor and contact data in structured format, out of the system, until new tax numbers are collected. When users receive new tax numbers from their customers, vendors and contacts they will update data prepared by RIM toolkit and import it back in the system (on 1.1.2010). RIM toolkit will ensure validation logic is executed over changed data.
On the other hand Style Sheet Tool will enable users prepare documents to send to customers, vendors and contacts to collect their new tax numbers (OiB).
Business process from customer perspective looks like this:
Over the next few weeks, I will post parts 2 and 3 in this series, which describe these four steps.
-Ivan Koletic
The Best Practices Analyzer for Microsoft Dynamics NAV 2009 is a tool for identifying issues that can prevent you from successfully deploying a three-tier environment of Microsoft Dynamics NAV 2009.
Three-tier environment deployments can be challenging because they often require additional domain administration tasks. The Best Practices Analyzer for Microsoft Dynamics NAV 2009 queries various sources and produces reports that can help you diagnose issues with your deployment.
The Best Practices Analyzer for Microsoft Dynamics NAV 2009 performs the following verifications:
You can find more information about the tool and download it from CustomerSource here:
https://mbs.microsoft.com/customersource/downloads/servicepacks/bestpracticesanalyzernav2009.htm
or from PartnerSource here:
https://mbs.microsoft.com/partnersource/deployment/resources/supplements/BestPracticesAnalyzerNAV2009
Multiple RTC:We know that Dynamics NAV classic client has very nice feature: we can start it with option ID=<zup file name>. In that way we can have many NAV shortcuts which open different db/companies.However Role Tailored Client looks like only one shortcut in menu and always starts the same client connected to "last server, last db, last company".
But we can create shortcuts for every needed connection in similar way as in CC, just we need to use option: settings:<clientusersettings.config file>.For example i want to have shortcut which always opens W1 db on server "a1", service "NAV W1", using port 7048 (not standard port). Then:
Now when i will click on this shortcut, it will try to connect to service tier described in config file.And i can create as many shortcuts as i want and at the same time to have opened many RTC connected to different db.Before use this shortcuts i must to create service tiers, but this is not current topic problem, it is described at Freddys Blog
How to run pages/reports from CC
During developing pages and SSRS reports in CC objects designer, usually we want to run it. However there are few issues:- If we run page (nice feature in Dynamics NAV SP1), it will start last RTC session connection. I mean for example i just looked how page looks in db "w1" by run it from RTC, and now opened CC and designing page in db "UK", and, if i push run button in object designer, then NAV will open RTC and run page from company "w1" (but I'm expecting "UK"). This is because NAV CC has no information about "service tier" and just starts last RTC session.- There are no possibilities "by default" to run RTC report from CC.With my friends help i created little trick and can run page/report from CC from current connected db.
Session.RESET;Session.SETRANGE("My Session",TRUE);Session.FINDFIRST;
WITH DevUserSetup DO BEGIN RESET; GET(LoginMgt.ShortUserID(Session."User ID"));
TESTFIELD("Server Name"); TESTFIELD("RTC Client exe"); TESTFIELD("NAV Server Name");
IF DELCHR(DevUserSetup."Settings path+name")='' THEN txtSettings := '' ELSE txtSettings:='-settings:"'+DevUserSetup."Settings path+name"+'"';
ShellString := '"' + "RTC Client exe" + '"';
IF Rec.Type=Rec.Type::Page THEN ShellParam := '"DynamicsNAV://' + "Server Name" + '/' + "NAV Server Name" + '/' + COMPANYNAME + '/' + 'RunPage?Page=' + FORMAT(Rec.ID) + '" '+txtSettings;IF Rec.Type=Type::Report THEN ShellParam := '"DynamicsNAV://' + "Server Name" + '/' + "NAV Server Name" + '/' + COMPANYNAME + '/' + 'RunReport?Report=' + FORMAT(Rec.ID) + '" '+txtSettings;
END;
SHELL(ShellString,ShellParam);
----------------------------------------------------------------------
Here "DevUserSetup" is variable type rec and point to my previous created table.So what does this code when i push button when cursor is on report 21? It creates string like: "c:\NAV RTC\Microsoft.Dynamics.NAV.Client.exe" "DynamicsNAV://DBserver/NAV W1/CRONUS International Ltd./RunReport?Report=21" -settings:"c:\NAV RTC\W1.config" and run it from SHELL.This will run RTC and opens report i want to see with data i want to look.The same is if i push button when cursor is on page.
That's allSpecial thanks to Martin Jordt Hansen
Gedas Busniauskas (gediminb)Microsoft Customer Service and Support (CSS) EMEA
When coding for Forms it is a common pattern to enable (or disable) controls based on values elsewhere on the Form. For example, a design may require that the ‘SEND' button is disabled until all fields are filled in and contain valid data.
In this post, I examine a simple Form and the Page output as generated from the Form Transformation Tool. To illustrate, I create a simple Form based on the Languages Table (Table 8) with no tabs and two fields, Code and Name. I've added a command button and the form looks like this when the language name is not equal to English:
And like this when the language is English:
To achieve the behaviour, I add the following code to the form:
Form – OnAfterGetRecord() Trigger
IF (Rec.Name = 'English') THEN BEGIN
CurrForm.CommandBtn.ENABLED(TRUE)
END ELSE
CurrForm.CommandBtn.ENABLED(FALSE)
When I run this form, I can iterate through the records and when I hit English, the Command button becomes enabled.
After using the Form Transformation Tool generating a Page, I compile and run the page. The output looks like the Page below and the functionality works. Here is a screenshot where the CommandBtn control is not enabled.
Here is a screenshot where the CommandBtn control is enabled.
It’s a bit more subtle than the Form but you can see the button is greyed out when not enabled.
On the Page the C/AL code has changed to:
Page – OnInit() Trigger
CommandBtnEnable := TRUE;
Page – OnAfterGetRecord() Trigger
CommandBtnEnable := FALSE ;
MESSAGE('English');
Under the covers, the CommandBtn.Editable has been mapped from a property that can be set in code to a global variable named CommandBtnEnable. This global variable is included in the data sent from the NAV Server to the RTC – this is visible from the property IncludeInDataset.
The Form transformation tool created the variable with IncludeInDataset, created the initializing code in the Page OnInit() trigger and assigned the global variable to the Enabled property in the CommandBtn action.
Rather than setting the property directly on the control, the RoleTailored Client exposes this functionality through a global variable and binds the property value to it. The advantage of this is that even simple properties needn’t be restricted to Yes/No values but can instead be evaluated in a more complex expression from C/AL. In the case above, we use TRUE and FALSE but it could also have been an expression with multiple components that evaluate to the TRUE or FALSE logic. This expression can be shared amongst controls so you need only set a single variable to control any number of controls on a page.
Note that this article describes the behavior of the enabled property and Command Buttons. Although in the C/SIDE Classic Client similar behaviour may be observed with Menu Buttons, during transformation Menu Buttons are transformed to the Action Menu which does not support the Enabled property.
- Stuart Glasson
https://mbs.microsoft.com/customersource/newsevents/news/generalnews/mainstreamsupportnav400sp3.htm
If you utilize some of the warehousing functionality - you have several reasons to look after 2009 SP1!
While improved productivity - for customers and partners alike - is one of the main benefits of Microsoft Dynamics NAV 2009, we continue to focus on quality. We strive to make improvements in the product application with every release. Microsoft Dynamics NAV 2009 SP1 is no different. NAV 2009 SP1 provides application enhancements to address customer and partner requests including the correction of up to 170 different issues in Warehousing. Some of these include fixes, redesign or consolidation in the following three areas:
Headlines of some of the fixes are added here:
-Philippe Jacobsen
The feature enhancements documents for Microsoft Dynamics NAV 2009 describe the enhancements to Microsoft Dynamics NAV 2.60 through 4.0 that are included in Microsoft Dynamics NAV 2009.
The feature enhancements are categorized by granule ID. This will show the new features added to granules customers have already purchased and aid customers and partners in the upgrade process to Microsoft Dynamics NAV 2009.
https://mbs.microsoft.com/customersource/documentation/whitepapers/NAV2009FeatureEnhancements
As a follow-up on my recent webcast (found HERE), here is the general walkthrough of how to create an XMLport and use it for sending data to NAV.
First, what we want to do is create our XMLport and make sure it has the elements and values that we want.
For the root element, I have set maxOccurs = 1 to avoid any confusion. For the general XMLport, the UseDefaultNamespace and the DefaultNamespace values have been edited as seen below.
Other than that, I have no code on my XMLport, but naturally, anything goes that would work on a regular XMLport. Now to the Codeunit:
ImportDim(VAR DimImport : XMLport DimImport) Return : Text[30] DimImport.IMPORT; EXIT('Import Run');
So basically we’re telling the XMLport to run an import and we’re returning to the Web Service that we’ve run. All we need to do now is expose the Web Service using Form 810:
Remember that the actual name of the codeunit does not have to match that of the service name here.
So now we move over to Visual Studio and start working with what we have. The first thing we’ll notice is that the WSDL matches our XMLport.
What we see is both the RootDimensions element which consists of multiple Dimension elements. From there, we can see the definition of the Dimension element the fields we’ve chosen to expose.
When creating a new project, we will go with a Windows Forms project this time.
And from there we will start off by adding a web reference to http://localhost:7047/DynamicsNAV/WS/Codeunit/DimensionImport .
The details on how to add a web reference can be found in the Developer and IT Pro Documentation.
On my new form, I have created two input boxes for the Code and Name of the dimension and a Create button.
And then we have the code on the Create button, along with helpful comments:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace NAV2009SP1WSDemo { using WSDI; public partial class Form1 : Form {
//Then we create a List to handle our (possible) multiple dimensions List<Dimension> DimList = new List<Dimension>();
//And then we create a single dimension Dimension Dim = new Dimension();
if (dimInputCode.Text != "" && dimInputName.Text != "") { //We assign the values from our textboxes to the single dimension Dim.DimensionCode = "AREA"; Dim.Code = dimInputCode.Text; Dim.Name = dimInputName.Text;
//Then we add the single dimension to our list DimList.Add(Dim);
//To get the list of dimensions "attached" to the root element, we use the following RootDim.Dimension = DimList.ToArray(); try { //Then we send to NAV and show our result ResultLabel.Text = NAVImport.ImportDim(ref RootDim);
} catch (Exception ex) { //Show a possible exception ResultLabel.Text = ex.ToString(); } } else { //Make sure there are values ResultLabel.Text = "Both values must be filled"; } } } }
Our wonderful application is now ready to run and all we have to do is press F5:
We have now created our XMLport, exposed it using a codeunit and set data into it from a form based application.
Lars Thomsen
Microsoft Customer Service and Support (CSS) EMEA
The C/AL Application Test Toolset for Microsoft Dynamics NAV 2009 SP1 is now available on PartnerSource. This toolset helps NAV developers to quickly develop and run C/AL-based tests in their primary development environment.
The toolset includes sample tests to help you get started with C/AL test development, tools for test case management and execution, and useful test library functions, such as assert and database state restore.
These tools build on top of the Test Features released with Microsoft Dynamics NAV 2009 SP1.
Download from PartnerSource
One of the problems when troubleshooting why a 3-tier setup of NAV 2009 doesn't work is, that the same error - typically this one on the SQL Server:
"Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'"
can be caused by any number of problems between NAV Server, SQL Server and Active Directory settings.
One quite common cause of this problem is duplicate SPNs. This post describes the problem with duplicate SPNs, and how to locate and solve it.
What is the problem:
When the NAV Server and SQL Server are on two different machines, a connection between Role Tailored Client (RTC) and the NAV Server requires Kerberos. Kerberos uses SPNs to locate which Windows account the NAV Server is running under. For this reason, each SPN must point to exactly one Windows account.
Once you start setting up and troubleshooting a 3-tier setup it is easy to end up trying new SPNs on new accounts, and forgetting to remove the original SPNs. And you may end up with the same SPN assigned to two different Windows accounts. More about SPNs in this post:
What do SPNs actually do - NAV 2009
How to check if you have duplicate SPNs:
This is easy if you have Windows 2008 somewhere on the domain. If you do, then from a command prompt, just run this command:
setspn -X
This command is new in Windows 2008, and was introduced exactly and specifically to help locating this problem.
If you do not have Windows 2008 anywhere on the domain, then use the command line tool called "ldifde" from a Windows Server 2000 or 2003. More details and examples about ldifde in this KB article:
LDIFDE - Export / Import data from Active Directory - LDIFDE commands
For the purpose of finding duplicate SPNs, use ldifde from a command prompt like this:
ldifde -f "c:\x\AD.txt" -l ServicePrincipalName
This will export values of the ServicePrincipalName-property for all accounts in Active Directory to a text file. Here is an example of the output of this command:
dn: CN=navservice,CN=Users,DC=contoso,DC=com changetype: add servicePrincipalName: HTTP/NAV-SERVER servicePrincipalName: HTTP/NAV-SERVER.contoso.com servicePrincipalName: DynamicsNAV/NAV-SERVER:7046 servicePrincipalName: DynamicsNAV/NAV-SERVER.contoso.com:7046 dn: CN=SQLDUI SD.,CN=Users,DC=contoso,DC=com changetype: add servicePrincipalName: DynamicsNAV/NAV-SERVER:7046 servicePrincipalName: DynamicsNAV/NAV-SERVER.contoso.com:7046
dn: CN=navservice,CN=Users,DC=contoso,DC=com changetype: add servicePrincipalName: HTTP/NAV-SERVER servicePrincipalName: HTTP/NAV-SERVER.contoso.com servicePrincipalName: DynamicsNAV/NAV-SERVER:7046 servicePrincipalName: DynamicsNAV/NAV-SERVER.contoso.com:7046
dn: CN=SQLDUI SD.,CN=Users,DC=contoso,DC=com changetype: add servicePrincipalName: DynamicsNAV/NAV-SERVER:7046 servicePrincipalName: DynamicsNAV/NAV-SERVER.contoso.com:7046
Then you must search manually for your SPNs, and see if they appear more than once. In this example, the SPN "DynamicsNAV/NAV-SERVER:7046" is set up for both accounts navservice and SQLDUI, so in this case you would have to remove this SPN from one of the accounts.
Lars Lohndorf-Larsen
"How To" article describing how to install the Microsoft Dynamics NAV 2009 SP1 Employee Portal on a 64-bit Operating System has been published on Partner Source*.https://mbs.microsoft.com/partnersource/deployment/documentation/howtoarticles/HowToInstall64bitNAV2009SP1EPNote: After downloading the .zip file rename it to .docx*Login is required to access Partner Source.Mohamad Vajid (mvajid)Microsoft Dynamics MEMicrosoft Customer Service and Support (CSS) EMEA