Microsoft Dynamics NAV

Team Blog

  • Microsoft Dynamics NAV Team Blog

    Using Client Extensibility in NAV 2009 SP1 to create Charts

    • 7 Comments

     

    Just to get a bit of practice with Client Extensibility, I experimented with some examples I got. They use MS chart controls to build chart

    components for RTC. As it turned out, the result was something that might even be useful as well. So this post has these two

    purposes: 1)  Some relatively simple examples of Client Extensibility, and 2)  hopefully in the process to make something that can

    actually be useful.

     

    Of course - as always - the information in this post is un-supported and no responsibility is assumed. In particular when working with

    Client Extensibility add-ons, one has to be careful of handling any potential error in the add-on. If the add-on meets an unhandled exception,

    then RTC may crash. So if you decide to extend the example here (and I hope you do), then just be careful to trap as many potential

    exceptions as possible in your Visual Studio code. This is lesson one for creating Client Extensibility Add-ins...

     

    However I would encourage any feedback - just post it here at the end of this post. Is this useful, what else would be useful, etc. Both

    for learning this new technology, and I would also welcome any ideas for charts that might be useful.

     

    Also check these links for much more information on Client Extensibility:
      Christian's blog
      Extending the RoleTailored Client Using Control Add-ins in Microsoft Dynamics 2009 SP1

     

    New blogs on this topics may follow - all depending on the response to this one. For now, this post shows how to achieve two different types of charts, looking like this:

     

     

    CustPage

      

    Making charts with Clients Extensibility for NAV 2009 SP1 using the "Microsoft Chart Controls add-on for MS Visual Studio"

    First, you need to download and install these two components:

    Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008

    Microsoft Chart Controls for Microsoft .NET Framework 3.5

     

    Then from here you can take the easy way and just use the completed project that I attached at the end of this post. Or the hard way, and follow the full directions below. First, if you just want to see what this is, here is how to implement this example from the files attached here:

     

    Implement the Client Add-in control:

    As the name suggests, Client Extensibility add-ons run on the client (RTC). In NAV 2009 SP 1, the RTC folder contains a new subfolder called "Add-ins" (default C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client\Add-ins). So unzip the attached file "XTCharts.zip", then copy the files from "XTCharts\bin\Debug\" into the Add-ins subfolder in RTC.

    Next, open a Classic Client and "Register" this add-in for the client: Run table 2000000069 "Client Add-in", and enter a new line:


    Control Add-in Name:    XTChart
    Public Key Token:    d1a25808afd603da

    It's important that you call it exactly this, since both the Add-in Name and the Public Key Token refer to these specific dlls (explained further below).

    This example includes codeunit 75550 "XT Chart Util" which has functionality generating the data that the charts are based on. So import XTChart.fob.

    Finally, add a chart control to a page. For this example add it to page 21 "Customer Card": In Page Designer, first create a new global variable called XTChartUtil, Type = Codeunit, SubType = XT Chart Util. To add the line-chart:

    add a new line called "Sales (LCY)" of type "Field", and specify these two properties:

    SourceExpr = XTChartUtil.CustPointsChart(Rec)

    ControlAddIn = XTChart;PublicKeyToken=d1a25808afd603da

    And to add the pie-chart, add a new line with these proerties:

    SourceExpr = XTChartUtil.CustDoughnutChart(Rec)

    ControlAddIn = XTChart;PublicKeyToken=d1a25808afd603da

    Save and compile the page, then start RTC, and the Customer Card page should now look as in the picture above.

     

    What this example gives, is: 1) A chart showing "Sales (LCY)" for the last 6 months, and a doughnut chart that shows the percentage of Balance compared to Credit Limit.

    Designing the client Add-in control:

    Hopefully by following the steps above, you should now have charts on your Customer Card. So here is how you would have designed it from scratch instead of using the attached example.

    To get started, open up Visual Studio 2008. Create a new project of type Class Library. In the project that opens, in the Solution Explorer, right click References, and select "Add Reference...". Here we need to add a few references:

    From the "Browse" tab, browse to the folder where you have Dynamics NAV RoleTailored Client installed (default C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client), and select Microsoft.Dynamics.Framework.UI.Extensibility.dll. This is the library that is always needed when making a Client Extensibility add-on.

    Add another reference, this time from the ".NET" tab select System.Windows.Forms.DataVisualization. This is the library that you installed from the links above. And, finally, also from the ".NET" tab, add System.Windows.Forms

    Also add references to these in code, like this in the top:

    using System.Windows.Forms.DataVisualization.Charting;

    using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;

    using Microsoft.Dynamics.Framework.UI.Extensibility;

    using System.Windows.Forms;


     

    And now you are ready to start using functionality from Client Extensibility, and from Microsoft Chart Controls.

    To start any Client Add-in control, you need two things:

    [ControlAddInExport()]-declaration just before the class you make, and

    protected override Control CreateControl() which is the function that RTC runs when initialising a Client Extensibility Add-in. Your project should now look like this:

     

     

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms.DataVisualization.Charting;

    using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;

    using Microsoft.Dynamics.Framework.UI.Extensibility;

    using System.Windows.Forms;

    namespace ClassLibrary8

    {

    [ControlAddInExport("XTChart")]

    public class XTChartClass : StringControlAddInBase

    {

    protected override Control CreateControl()

    {

    Chart XChart = new Chart();

    return (XChart);

    }

    }

    }

     

    You must remember the name you decide on, in this line:

     [ControlAddInExport("XTChart")

    This is the name (XTChart) that must match the entry in table 2000000069 "Client Add-in".

    This is the minimum code needed - you can of course now also specify a number of properties for your chart control, like colours, chart types, etc. As long as you create your control here, and then return it back to RTC.

    The next question is: how do we send data from RTC to our control? This done by adding these lines:

    public override string Value

    {

    get

    {

    return base.Value;

    }

    set

    {

    base.Value = value;

    }

    }

     

    This is the Value that you get from RTC. RTC sends it via the SourceExpression of the Control Add-in when you add it to a page. When you add an Add-in to a page you don't have to specify SourceExpression, but if you want to send data from RTC to the Add-in, then this is how to do it. In this example there is a codeunit to generate chart-data, but SourceExpression can also just be a field.

    In the section you just created, you can now refer to the chart like this: 

    ((Chart)this.Control)

    So when receiving data from RTC, you can then set ChartType, Data, and any other properties on the chart.

     

    You must also sign the project: In Project Properties, on the "Signing"-tab, you must tick "Sign the assembly". This embeds a public key token in the .dll when you build it, and this is the token (here d1a25808afd603da) that must also be entered into table 2000000069. Visual Studio does not tell you what the token is, so to obtain it, after building your project open a Visual Studio Command Prompt, and run "sn -T XTCharts.dll" to find out what the public key token is for XTCharts.dll.

     

    In this example, we send an XML structure to the Add-in, which is generated by the codeunit. The structure is like this:

    - <Chart>
        <ChartType>2</ChartType>
    - <Data>
        <Aug>446.04</Aug>
        <Sep>334.53</Sep>
        <Oct>0</Oct>
        <Nov>111.51</Nov>
        <Dec>501.8</Dec>
        <Jan>1,499.02</Jan>
    <</Data>
     </Chart>
     
     So basically, we have one node for the Chart Type (1 is for a point-chart, and 2 is for a doughnu chart). And then there is a data-section for the Series in the chart.
     
    Finally, in the code below, also notice these lines:

    try { - do code..}

    catch{MessageBox.Show("An error occurred ");}

     
    I am not a c# developer, so this way of doing error handling is likely not optimal. But if any kind of error happens in the code, and it is not inside of a try{}-structure, then the Add-in may crash, and when that happens, RTC will also crash. In this example, instead of a crash, we would get a message and RTc would stay open.
     
     
    So, below is the whole code from the attached example. Remember this particular code is designed specifically receive data in a specific format, done by the attached codeunit. So it can of course be simplified, or of course even more so, it is something that can be improved on.
     
     
     
    Again, I hope this is useful for getting insight into Client Extensibility, but also maybe it can be used as a basis for making some useful components - comments are more than welcome,
     
    Best regards
    Lars
     
     
     
     
     
     
    Full code:
     

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms.DataVisualization.Charting;

    using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;

    using Microsoft.Dynamics.Framework.UI.Extensibility;

    using System.Windows.Forms;

    using System.Drawing;

    using System.Xml;

    namespace XTCharts

    {

    [ControlAddInExport("XTChart")]

    public class XTChartClass : StringControlAddInBase

    {

    protected override Control CreateControl()

    {

    Chart XChart = new Chart();

    XChart.Series.Add("Series1");

    XChart.ChartAreas.Add("Default");

    XChart.Width = 100;

    XChart.Height = 100;

    return (XChart);

    }

    public override string Value

    {

    get

    {

    return base.Value;

    }

    set

    {

    try

    {

    if (Convert.ToString(value) != "")

    {

    ((Chart)this.Control).Series["Series1"].Points.Clear();

    String TempXML = value;

    XmlDocument XMLDoc = new XmlDocument();

    XMLDoc.LoadXml(TempXML);

    // Chart Type

    XmlNode Node = XMLDoc.SelectSingleNode("Chart/ChartType");

    switch (Convert.ToString(Node.InnerText))

    {

    case "1":

    ((Chart)this.Control).Series["Series1"].ChartType = SeriesChartType.Spline;

    ((Chart)this.Control).BackColor = Color.AliceBlue;

    break;

    case "2":

    ((Chart)this.Control).Series["Series1"].ChartType = SeriesChartType.Doughnut;

    break;

    default:

    MessageBox.Show("Invalid ChartType " + Convert.ToString(Node.InnerText));

    break;

    }

    // Chart Data

    XmlNodeList Nodes = XMLDoc.SelectNodes("Chart/Data/*");

    for (int i = 0; i < Nodes.Count ; i++) {

    Node = Nodes.Item(i);

    ((Chart)this.Control).Series["Series1"].Points.AddXY(Node.Name, Convert.ToDouble( Node.InnerText));

    }

    }

    }

    catch{MessageBox.Show("Error with data from NAV " + value);}

    }

    }

     

     

    }

    }

     
     
  • Microsoft Dynamics NAV Team Blog

    Upgrade Toolkit Quick Guides Revised for Microsoft Dynamics NAV 2009 SP1

    • 2 Comments

    The Upgrade Toolkit Quick Guides provide detailed roadmaps for moving your applications from earlier versions of Microsoft Dynamics NAV to Microsoft Dynamics NAV 2009 SP1. There are four Quick Guides:

    • Upgrade Quick Guide 370_2009SP1.doc: For upgrading from Microsoft Dynamics NAV 3.7 to Microsoft Dynamics NAV 2009 SP1.
    • Upgrade Quick Guide 400_2009SP1.doc: For upgrading from Microsoft Dynamics NAV 4.0 to Microsoft Dynamics NAV 2009 SP1.
    • Upgrade Quick Guide 500_2009SP1.doc: For upgrading from Microsoft Dynamics NAV 5.0 to Microsoft Dynamics NAV 2009 SP1.
    • Upgrade Quick Guide 2009_2009SP1.doc: For upgrading from Microsoft Dynamics NAV 2009 to Microsoft Dynamics NAV 2009 SP1.

    To get the Quick Guides, scroll down to "Upgrade Toolkit Quick Guides" on the Microsoft Dynamics NAV 2009 Service Pack 1 (SP1) page on PartnerSource and click Download Here.  A PartnerSource login is required. All four Quick Guides are included in a single compressed file: UpgradeQuickGuides_2009SP1.zip.

  • Microsoft Dynamics NAV Team Blog

    Changes Document Now Available

    • 3 Comments

    The Changes document for Microsoft Dynamics NAV 2009 SP1 is now available on Partnersource. With this release, we are trying out a new format and would like to hear your feedback on the following:

    • Does the format work for you?
    • Does this Changes document provide you with the information you expect?
    • Does this Changes document provide you with the information you need?

    Add your feedback in the comments below.

    You can download the document from the following location:  Changes Made In Microsoft Dynamics NAV 2009 SP1. Log in to Partnersource is required.

  • Microsoft Dynamics NAV Team Blog

    NAV 2009 SP1 Help Source Files for Belgium, Sweden, and Norway Released

    • 1 Comments

    With the recent release of Microsoft Dynamics NAV 2009 SP1 for Belgium, Norway, and Sweden, we have now released the Help source files for those countries. If you are creating a solution for those countries, you can customize the Help source files to match your solution. You can download the files here.

     

    In addition, we have re-released the Help source files for all Microsoft Dynamics NAV 2009 SP1 countries to add a file that contains translated boilerplate text. You can download the updated source files here. Finally, we’ve re-released the Microsoft Dynamics NAV 2009 SP1 Help Toolkit with updated documentation on creating customized Help. You can download the updated toolkit here. (Note that PartnerSource access is required for all downloads.)

     

    As always, let us know what you think about the Help, the customization process, the tools, what's missing, and what would be more helpful. Send your feedback to navhelp@microsoft.com.

  • Microsoft Dynamics NAV Team Blog

    How would I use RIM and Style Sheet Tool to handle change of Tax Number (OiB) in Croatia (Part 3 of 3)

    • 0 Comments

    In part 1 of this series, I described the problem of the tax numbers in Croatia being changed. In part 2, I described how to export data that you need from NAV and use that data to request new tax numbers from customers, vendors sand contacts. In this post, I will describe how to update the data with new tax numbers and import it into Dynamics NAV.

    Update new tax number data received from customers, vendors and contacts

    When you receive documents with new tax numbers (OiB) from customers, vendors and contacts, you can update excel file you created in first step with it. You should update VAT Registration No. field in Excel file in Customer, Vendor and Contact worksheets.

    After you're finished updating data and are satisfied with it it's time to import it back to Dynamics NAV.

    First, make sure that new tax number validation rules are set in Dynamics NAV. You can do this following these steps:

    1. In Microsoft Dynamics NAV, on the main menu, click Administration, Application Setup, General, Countries/Regions to open the Countries/Regions form.

    ivan21

    2. Select Croatian record (code HR) and click Country/Region, VAT Reg. No. Formats to open HR - VAT Registration No. Formats form.

    ivan22

    3. Verify that 2 lines containing 11 pounds (# symbols) exist in the table, as new tax number in Croatia is formatted in a way that it contains 11 numeric characters.

    After this, you can proceed to importing data you prepared in excel file created in first step. You can do this following these steps:

    1. Click Application Setup-> Company Setup-> Data Migration in Administration application domain to open Migration overview form.

    2. Click Functions-> Import from Excel on Migration Overview form to import data from Excel file.

    3. When asked, select folder and Excel file from which to import data and click Open.

    4. System will import data and notify you when it's done.

    ivan23

    5. To verify that something was really imported, verify that No. of Migration Record is different from zero in Migration Overview form.

    6. If some errors occurred (like new tax number didn't comply to format set earlier), you can see this by clicking Drill Down button in No. of Migration Errors field in Migration Overview form.

    7. When all errors are removed (No. of Migration Errors is zero) for all lines you need to apply migration data. Select all lines, clicking Edit, Select All to select all lines in Migration Overview form

    8. Click Migration, Apply Migration Data to apply migration data

    9. To verify data was applied, verify that No. of Migration Record is zero in Migration Overview form

    10. Also, you may open any of your customer, vendor and contact records in the system and verify that VAT Registration No. field contains the value set in excel file.

    To make sure your VAT reporting will take VAT Registration numbers correctly have a look at these KB articles which describe a small modification needed to VAT Sales Book and VAT Purchase Reports to enable this.

    -Ivan Koletic

  • Microsoft Dynamics NAV Team Blog

    The “OK” button is greyed out in RTC server selection window

    • 1 Comments

    Did decide to write this blog since this simple problem did take a lot of time for me to find the solution for, in the hope that it will save you from the same time eater.

    The problem I did run into was that when starting the RTC client it could not connect to the service, since I had moved the service. Since the service had moved I did say “no” to the questions if RTC should try to connect again. In the address field in the “server selection window” I did type the new address into the address field. The “OK” button was now greyed out, so I could not connect to the server.

    After spending some time to try to figure it out how to un grey the “OK” button I found by simple press TAB in the address field makes RTC to connect to the service and retrieve the companies on the service. Now the “OK” button was not greyed out anymore.

  • Microsoft Dynamics NAV Team Blog

    Overviews of Released Platform Hotfixes for Microsoft Dynamics NAV 5.0 SP1, Microsoft Dynamics NAV 2009, and Microsoft Dynamics NAV 2009 SP1

    • 1 Comments


    Overviews of released platform hotfixes for Microsoft Dynamics NAV 5.0 SP1, Microsoft Dynamics NAV 2009, and Microsoft Dynamics NAV 2009 SP1 are available on PartnerSource and CustomerSource at the following links:

    PartnerSource:

    Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 5.0 SP1

    Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2009

    Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2009 SP1

    CustomerSource:

    Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 5.0 SP1

    Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2009

    Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2009 SP1

  • Microsoft Dynamics NAV Team Blog

    Update to Microsoft Dynamics NAV 2009 Developer and IT Pro Help

    • 0 Comments

    We've released an update of the Microsoft Dynamics NAV 2009 Developer and IT Pro Help to MSDN and the Microsoft Download Center. This release includes new and updated content in the following areas:

    • Automation
      • Added new topics and updated existing topics about using Automation with the RoleTailored client.
      • Improved Automation walkthroughs
    • Arranging Page Fields in Rows and Columns
      • Added topics about how to use the FixedLayout control to arrange page fields in rows and columns.
    • Multilanguage Functionality
      •  Updated the topics about developing multilanguage-enabled applications and installing language modules.
    • FIND and FINDSET functions
      • Added information about when to use the FIND function and when to use the FINDSET function.
    • Code Rules in Form Transformation
      • Updated existing topic to fix examples and improve clarity.
    • Redesigning Matrix Forms for Form Transformation
      • Updated topics to reflect the new redesigned matrix forms in Microsoft Dynamics NAV 2009 SP1.
      • Added a new walkthrough with details about how to redesign a matrix form.
    • Web Services
      • Added numerous clarifications and enhancements, including a new Web Services Programming Tips topic
    • Best Practices Analyzer for Microsoft Dynamics NAV 2009
      • Added references in two topics for this new diagnostic tool, which identifies configuration issues that might be preventing your three-tier deployment of Microsoft Dynamics NAV from working correctly and is available separately as a download.
    • Configuring Access Control Lists with Microsoft Dynamics NAV 2009 Web Services
      • Added information to clarify best practices when configuring Web services to use SSL, configuring Web services to use delegation, or configuring Web services to use both SSL and delegation.

    Some of these updates are based on feedback that we received from the community. We love hearing from you about how we can make the Help even better! We encourage you to continue to use the feedback link at the bottom of each page in the CHM, or use the Ratings and Feedback form on each MSDN page to tell us what you think.

     - Bob, Jill and John (the writers for NAV Developer and IT pro Help)

  • Microsoft Dynamics NAV Team Blog

    Transformation Tool : FontBold on Controls

    • 5 Comments

    FontBold property sets a value that indicates whether to display text in boldface. This property applies to form controls. In standard application this property is normally used to display accounts that are not posting accounts in boldface (form16 - Chart of Accounts). 

    For a page field control, Style Property is used to format the text that displays in a page field. More details about this can be found in Microsoft Dynamics NAV Developer and IT Pro Documentation, designing pages.

    When running Transofrmation Tool to transform forms to pages in NAV 2009 SP1, records displayed in boldface on a form are not displayed in boldface on the page, after the transformation.

    To change this, following files should be modified:

    Page.xsd (add property definition to page field control):

          ....

          <xs:element name="ClosingDates" type="NavBoolType" minOccurs="0" maxOccurs="1" />
          <xs:element name="Numeric" type="NavBoolType" minOccurs="0" maxOccurs="1" />
          <xs:element name="DateFormula" type="NavBoolType" minOccurs="0" maxOccurs="1" />
          <xs:element name="Style" minOccurs="0" maxOccurs="1">  <!--  This is where the Style property is added. BEGIN changes  !-->
          <xs:simpleType>
              <xs:restriction base="xs:string">
                  <xs:enumeration value="None" />
                  <xs:enumeration value="Strong" />
                  <xs:enumeration value="Attention" />
                  <xs:enumeration value="Favorable" />
                  <xs:enumeration value="Unfavorable" />
              </xs:restriction>
          </xs:simpleType>
       </xs:element>
       <xs:element name="StyleExpr" type="xs:string" minOccurs="0" maxOccurs="1" />   <!--  This is where the StyleExpr property is added. END changes  !-->
    </xs:all>
    </xs:complexType>
    ....

    Now that we have added Style and StyleExpr properties to the field control in page definition, we must modify CodeRules.txt file to transfer UPDATEFONTBOLD function to <FieldName>Emphasize variable defined for each field on page (that UPDATEFONTBOLD function was called for on a form).

    In addition, Style property of the field shuld be set to Strong, and StyleExpr property to <FieldName>Emphasize. Transformation tool already creates a trigger called <FieldName>OnFormat for each field affected, that sets the value of <FieldName>Emphasize variable conditionally.

    In short, replace the following code in file CodeRules.txt:

    .....

     <find>
    !currForm!.!var1!.UPDATEFONTBOLD :=
    <declareVariable>
    !var1!Emphasize
    <declareVariableType>
    Boolean INDATASET
    <replace>
    !declaredVariable! :=
    <comment>

    .....

    with

    <find>
    !currForm!.!var1!.UPDATEFONTBOLD :=
    <replace>
    !currForm!.!var1!.UPDATEFONTBOLD :=
    <moveValueToProperty>
    Strong
    <movePropertyToControlName>
    !var1!
    <moveToProperty>
    Style

    <find>
    !currForm!.!var1!.UPDATEFONTBOLD :=
    <declareVariable>
    !var1!Emphasize
    <declareVariableType>
    Boolean INDATASET
    <replace>
    !declaredVariable! :=
    <moveValueToProperty>
    !declaredVariable!
    <movePropertyToControlName>
    !var1!
    <moveToProperty>
    StyleExpr

    Run transformation tool on from 16, import and compile the page. When running page 16 (Chart of Accounts) the records should be displayed in boldface, the same way they are displayed on the form.

    Jasminka Vukovic 

    Microsoft Dynamics NO

    Microsoft Customer Service and Support (CSS) EMEA

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

     

     

  • Microsoft Dynamics NAV Team Blog

    Calculated field on a page is only recalculated when the OnValidation trigger is run

    • 0 Comments

    Summary

    If you have a page field that has a calculation as its SourceExpression and part of the calculation depends on another field, then the calculated field is not automatically recalculated when the other field is updated. The calculated field will first recalculate when the updated field's OnValidate trigger is run, which  only runs if it contains code. So to enable the calculated field to recalculate automatically, you must put some code on the OnValidate trigger of the field that gets updated - even if it is only a comment line with no functionality.

    Note: A page will only update a field if it detects that there is some code on the OnValidate trigger. This is done for performance reasons to avoid unnecessary updates.

    Example

    Let's say you have the following two fields on a page:

    Field1:
    Name=Txt1;
    SourceExpr=Txt1;

    Field2:
    Name=NewTxt1;
    SourceExpr=Txt1 + 'XYZ'

    Field2 is supposed to add the text 'XYZ' to the value is entered in Field1. But when you enter a value in Field1, Field2 does NOT get automatically updated. To change this behaviour, add some C/AL code to the OnValidate trigger of Field1. For example, just add a simple comment like "//" or:

    //This comment is used to update Field1 - do not delete

    This will tell Field1 to run the OnValidation trigger, which in turn updates the other fields on the page.

  • Microsoft Dynamics NAV Team Blog

    How would I use RIM and Style Sheet Tool to handle change of Tax Number (OiB) in Croatia (Part 2 of 3)

    • 0 Comments

    In my previous post, I described the problem of the tax numbers in Croatia being changed. In this post, I will describe the first steps to solve the problem. In part 3, I will describe what to do when you receive the new tax numbers. The business process from customer perspective looks like this:

    1. Export customer, vendor and contact data from Dynamics NAV to Excel file
    2. Request customers, vendors and contacts for their new tax number using documents created with help of Style Sheet Tool
    3. Enjoy the year end holidays with friends and family
    4. Update data exported in step 1 with new tax number received from customers, vendors and contacts and import it back in Dynamics NAV

    Export data from Dynamics NAV

    Here is the overview of how I did this in NAV HR 5.0 SP1 Feature Pack 1:

    1. Click Application Setup-> Company Setup-> Data Migration in Administration application domain to open Migration overview form.

    ivan1

    2. Create 3 lines by entering table IDs of Customer, Vendor and Contact tables (and any customized tables you might have that contain VAT Registration No.).

    3. Position cursor on line representing Customer and click Migration-> Migration fields menu item to open Customer - Migration Fields form.

    ivan2

    4. Place a checkmark in Include field for each Customer field you want export. At minimum (to complete this task place checkmark in Include field of lines representing following fields:

    • Name - this will allow you to see see which customer's VAT Registration No you're changing
    • Country/Region Code - this will allow you to filter out only Croatian customers (having Country/Region Code set to HR or empty)
    • VAT Registration No. - this will allow you to see the "old" VAT Registration No.

    Optionally, if you decide to use exported data for Mail Merge this data and send to customers, vendors and contacts to ask them for their new tax number, you may need to include following information as well:

    • Address - this will allow you to send the documents by mail
    • Address 2 - this will allow you to send the documents by mail
    • Post Code - this will allow you to send the documents by mail
    • City - this will allow you to send the documents by mail
    • Fax - this will allow you to send the documents by fax
    • E-mail - this will allow you to send the documents by e-mail

    5. When satisfied click OK to return to Migration Overview form.

    6. Repeat steps 3-5 for Vendor and Contact tables and when satisfied click Functions-> Export to Excel on Migration Overview form to export data to Excel.

    7. When asked, select folder and file name in which to store exported data and click Save.

    8. System will export data and notify you when it's done. The result should be excel file with 3 worksheets (Contact, Vendor and Customer) containing data from selected fields.

    ivan3

    NOTE: Depending on which method you’ll use to collect data from customer, vendors and contacts you’ll need various degrees of data detail from Dynamics NAV.

    Request new tax number from customers, vendors and contact

    For the sake of example, I'll assume you'll request your customers, vendors and contacts to send you their new tax number using regular mail (as it should be the hardest to setup), using data exported from Dynamics NAV created in previous step.

    NOTE: I assume you successfully imported Style Sheet Tool objects 1.1. as described in User Guide for Style Sheet Tool.

    Here is the overview of how I did this in NAV HR 5.0 SP1 Feature Pack 1:

    1. Open Object Designer and run Form 680

    ivan4

    2. In the Code field, provide a code for naming the style sheet you are about to create. This could be, for example, CUSTOMER_NTN.

    3. In the Description field, type in a description of the style sheet, for example, Request Customers New Tax Number.

    4. In the Form No. field, click the Lookup button and in the Style Sheet Object List window, select the Customer List form (form 22).

    5. In the Table No. field, click the Lookup button and in the Style Sheet Object List window, select the Customer table that is associated with Customer List. In this case it is table 18.

    ivan5

    6. In the Base Record field, select the Base Record check box.

    7. In the Multiple Lines field, select the Multiple Lines check box.

    8. Click Style Sheet, Select Fields to open the Customer - Style Sheet Fields Used List window. These fields are the ones you want to show in the final, merged Word document.

    9. In the Field No. field, click the Lookup button, and in the Style Sheet Field List window, select, for example, the fields Name, Name 2, Address and other. The Include Caption check box in the Item - Style Sheet Fields Used List window has automatically been selected for each field. This will make the caption of the fields available in your Word document. If you do not want captions but only want the data fields to be visible on your document, clear the check box for the field captions you do not want.

    ivan6

    10. Close the Item - Style Sheet Fields Used List window.

    The fields to use for Customer have now been defined and you are ready to merge the selected fields into a Word document as mail merge fields.

    11. On the style sheet card that you just created, click Style Sheet, Create Mail Merge. This will open up Word. The fields you have chosen for the Customer will now be available in Word.

    12. In Word, click the Mailings tab, Insert Merge Field and select each field one at a time. Design the document as necessary by adding your own text and pictures. The mail merge could look like this:

    ivan7

    NOTE: Make sure to insert a table element between MULTILINE_BEGIN_Customer  and MULTILINE_END_Customer merge fields. This will ensure text within table element to be repeated multiple times.

    13. Close Word when you are finished.

    You will now return to Microsoft Dynamics NAV.

    1. Click Yes to import the mail merge document.

    2. Click Yes to convert the mail merge document to a style sheet document.

    3. Click Yes to update Manage Style Sheets. This will associate the style sheet you just created with the Customer List.

    4. In Microsoft Dynamics NAV, on the main menu, click Financial Management, Receivables, Customers to open the Customer Card.

    5. Click Customer, List to open Customer List

    ivan8 

    6. Filter the list by Country/Region code selecting customers you want to prepare to documents using Style sheet you created in previous steps

    ivan9

    7. On the Toolbar, click Send Options.

    ivan10

    8. In the Send Style Sheet Card to Microsoft Word - Program Selection window, select Microsoft Word and click Send

    A Word document will be generated based on the Customer style sheet you have just created, and filtered data from the Customer List is imported to a Word document which now looks like this:

    ivan11

    You can do the similar thing with vendor and contact records.

    To reuse the settings and documents used in this example follow these steps:

    1. Open Object Designer and run Form 680.

    2. Click Style Sheet, Manage, Definition, Import to import style sheet definition.

    3. Select example.xml file attached to this document (within example.zip file).

    4. Click Yes to import the mail merge document.

    5. Select example.docx file attached to this document (within example.zip file).

    6. Click Yes to convert the mail merge document to a style sheet document.

    7. Click Yes to update Manage Style Sheets. This will associate the style sheet you just created with the Customer List.

    Enjoy year end holidays with family and friends

    I'll leave you to decide the way you handle this part! :-)

    -Ivan Koletic

  • Microsoft Dynamics NAV Team Blog

    Treemap Business Data Visualization available on PartnerSource

    • 1 Comments

    The “Treemap Business Data Visualization for Microsoft Dynamics NAV 2009 SP1 – Partner Community Edition” is available for download on PartnerSource. It will be available on CustomerSource in a few days.

    For more information about using this add-in, take a look at Christian's blog.

  • Microsoft Dynamics NAV Team Blog

    Dynamics NAV RTC hangs when previewing/printing reports

    • 0 Comments

    Problem:
    When previewing a report you only getting a small window in upper left corner with only a text string with the name for the report and the rest blank. When I trying to close this window, you get an error message: "Errors exist. Do you want to discard changes?" (Y/N). Pressing Yes, hangs and close the RTC client.

    Probably cause:
    You have installed the RTC client outside the setup chainer or you have uninstalled Report Viewer 2008. It may also be that Report Viewer 2008 installation is broken.

    Solution:
    Run DVD\Prerequisite Components\Microsoft Report Viewer 2008\ ReportViewer2008.exe and select install or repair depending on if Report Viewer 2008 was already installed.

  • Microsoft Dynamics NAV Team Blog

    How would I use RIM and Style Sheet Tool to handle change of Tax Number (OiB) in Croatia (Part 1 of 3)

    • 0 Comments

    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:

    1. Export customer, vendor and contact data from Dynamics NAV to Excel file
    2. Request customers, vendors and contacts for their new tax number using documents created with help of Style Sheet Tool
    3. Enjoy the year end holidays with friends and family
    4. Update data exported in step 1 with new tax number received from customers, vendors and contacts and import it back in Dynamics NAV

    Over the next few weeks, I will post parts 2 and 3 in this series, which describe these four steps.

     -Ivan Koletic

  • Microsoft Dynamics NAV Team Blog

    Best Practices Analyzer for Microsoft Dynamics NAV 2009

    • 1 Comments

    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:

    • Verifies that an appropriate version of Microsoft Dynamics NAV Server is installed. Only Microsoft Dynamics NAV 2009 SP1 is supported.
    • Verifies Microsoft Dynamics NAV connection strings.
    • Verifies that the Microsoft Dynamics NAV Server service, the Microsoft Dynamics NAV Web services service, and the SQL Server service are running.
    • Checks database permissions to make sure that the required resources can connect to the database.
    • Verifies that the necessary service principal names (SPN) have been created and correctly configured on the account that is running the Microsoft Dynamics NAV Server service.
    • Verifies that constrained delegation has been configured.

    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

Page 36 of 51 (763 items) «3435363738»