Microsoft Dynamics NAV

Team Blog

  • Microsoft Dynamics NAV Team Blog

    NAV 2009 Tips and Tricks: Change the default filter in fields that take input

    • 0 Comments

    In fields that take input, such as Sell-to-Customer No., Location Code, or  Address, as you start entering characters, a drop-down list shows possible field values that match the characters you have typed. Typcally, Microsoft Dynamics NAV sets the default filter to the number value in number fields such as Customer No. and to the text value in fields such as Address.

    But you can change the default field you use as a filter. In this example, you can change the filter from No. to Name.

    1. In the drop-down list, click the heading of the column you want to set as a default filter column.
    2. Click Set as default filter column.

     

    Now, as you type in the Sell-to Customer No. field, the filter is set to look in the Name column rather than the No. column.

    For more information about usability and the RoleTailored client, see the blog post Useful, Usable, and Desirable.

  • Microsoft Dynamics NAV Team Blog

    NAV 2009 Tips and Tricks: Search for pages, reports and views from the Role Center

    • 5 Comments

    You can find any page, report, or Departments view in your installation by using the Search box to the right of the Address box. In this way you reduce the amount of time you spend searching.

    When you start typing characters in the Search box, a drop-down list shows page and report names containing the character(s) you type. The drop-down list changes as you type more characters, and you can select the correct page or report from the list when it is displayed. The second column in the drop-down list shows the navigation paths to the found pages and reports. You can select the path in the second column to navigate to the Departments page where the page or report exists.

    Here are the detailed steps for searching for pages, reports, and Departments views from the Role Center.

    1. In the Search field in the top right corner, type "sales".

    The drop-down list changes as you type more characters, and you can select the correct page or report from the list when it is displayed.

    2. Continue typing with "invoices".

    The second column in the drop-down list shows the navigation paths to the found pages and reports and you can select the path to navigate to the Departments page where the page or report exists.

    3. Select either the page or report in the first column of the search results or the path in the second column of the search results.

     For more information about usability and the RoleTailored client, see the blog post Useful, Usable, and Desirable.

  • Microsoft Dynamics NAV Team Blog

    Table Data Type values (used in Record Links)

    • 2 Comments

    Sometime ago I have promised to publish the numbers used in NAV for the data types. These numbers are used all over the system, but are more visible when encoding record links (please refer to my post about encoding record links). This list contains the data types that are available in Tables in NAV 2009 SP1.

    Data type

    ID

    Comment

    Integer

    00 86

     

    Text

    00 88

     

    Code

    00 89

     

    Decimal

    00 32

     

    Option

    00 8B

     

    Boolean

    00 85

     

    Date

    00 2E

    (0x2E ‘+’ 0)

    Time

    01 2E

    (0x2E ‘+’ 1)

    Binary

    N/A

     

    BLOB

    N/A

     

    DateFormula

    16 2E

    (0x2E ‘+’ 22)

    TableFilter

    N/A

     

    BigInteger

    00 8D

     

    Duration

    00 90

     

    GUID

    00 91

     

    RecordID

    7D 13

    (0x13 ‘+’ 125)

    DateTime

    00 92

     

     

    Internally some types are “extensions” of other types, and therefore are composed as a base type and subtype ID. As an example Time (2E ‘+’ 1) is a “subtype” of Date (2E ‘+’ 0).

  • Microsoft Dynamics NAV Team Blog

    Few tips for NAV developers

    • 4 Comments

    I have collected few tips maybe could be used in NAV 2009 developing.
    Don't claim me too much if this looks to easy... :)

    1. Files managing on RTC pc.
      In C/AL we have statements for working with files like: EXISTS(<File_Name>); RENAME(<Old_File_Name>,<New_File_Name>); ERASE(<File_Name>); COPY(<From_File_Name>,<To_File_Name> ) . But this is working only on CC, as on RTC these statements are executed on Service Tier. What to do if we want to managing files on RTC PC?
      I propose to use automation: 'Windows Script Host Object Model'.FileSystemObject.  If we create it using "Client side" parameter, then automation will be loaded on RTC and we can use all functions from it.
      For example functions:
      Function in NAV C/AL Function in automation
      EXISTS(<File_Name>); <automationName>.FileExists(<File_Name>);
      RENAME(<Old_File_Name>,<New_File_Name>); <automationName>.MoveFile(<Old_File_Name>,<New_File_Name>);
      ERASE(<File_Name>); <automationName>.DeleteFile(File_Name>[, BOOL Force]);
      COPY(<From_File_Name>,<To_File_Name> )  <automationName>.CopyFile(<From_File_Name>,<To_File_Name>);
    2. Different view of boolean fields in RTC.
      Usually boolean fields are showed as checkmarks in RTC, but we can make it in different view - show "Yes/No". This could be done by just adding comments to filed trigger "OnDrillDown".
      Here is example what we see in RTC: 1st boolean has comments in trigger as 2nd is typical view.
       
    3. Usage virtual table 2000000022 "File" in RTC.
      If you are using this virtual table somewhere in CC and now want to transfer functionality to RTC, you need to know few points:
      1. Virtual table will show files/olders on service tier (not on RTC) and this is different from CC where you saw info from user pc.
      2. If you are using table "File" in RTC, then don't use field "Data". In CC it shows "*" if there are data in file, however RTC starts reading all data from file and loads memory/processor.

    Thank you

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV Compatibility with Microsoft Office 2010 and Microsoft SharePoint 2010

    • 8 Comments

    With the release of Office 2010 and SharePoint 2010 the relationship between internal line of business applications and business productivity software is stronger than ever. There have been added many exciting new features, which will bring value to many customers, including those customers that are using Microsoft Dynamics NAV today.

    User Interface

    The user interface (UI) is the "face" of a software application - A good user interface is intuitive, familiar, and easy to use. It improves productivity by minimizing the number of clicks required to get a task done. This is what we accomplished with the release of the RoleTailored client in Microsoft Dynamics NAV 2009. The Fluent UI is now used by all Microsoft Office programs as well as SharePoint Server 2010, and does away with menus, which were growing increasingly complex, replacing them with a clear set of icons that are relevant to the task being performed.

    With the 2010 release, Microsoft Office, Microsoft SharePoint Server, and Microsoft Dynamics now share this strong "facial" resemblance, making them more consistent to use and easier to adopt.

    Connectivity

    Just as beauty is more than skin deep, so the ties between Microsoft Dynamics and Microsoft's business productivity infrastructure run deeper than just the UI.  Business Connectivity Services (BCS) is a new technology that crosses Microsoft Office 2010 and Microsoft SharePoint Server 2010, and can be thought of as "plumbing" for connecting business applications through Web Services in Microsoft Dynamics NAV 2009 with SharePoint and Office. This is no ordinary plumbing, though, as it enables some powerful new scenarios for Microsoft Dynamics NAV customers, including the ability to update information stored in a Microsoft Dynamics NAV database directly from a SharePoint site, and making it easier to take Microsoft Dynamics NAV information offline through either Outlook 2010 or SharePoint Workspace 2010. 

    Analysis

    The majority of Microsoft Dynamics customers use Microsoft Excel to analyze their business information. PowerPivot for Microsoft Excel 2010 offers the ability to quickly create PivotTables or PivotCharts that are pulling in data from Microsoft Dynamics ERP or CRM in real time. New Excel 2010 features such as Slicers and Sparklines can then be added to bring the numbers to life and gain deeper insights into what's happening in the business.  

    Compatibility

    Since Microsoft Dynamics NAV always has had a strong integration to the Office and SharePoint products, we are proud to announce that Microsoft Dynamics NAV 2009 SP1 and Microsoft Dynamics NAV 5.0 SP1 Update 2 are compatible with Microsoft Office 2010 and Microsoft SharePoint 2010!

    The details in the support for the different Office and SharePoint integrations are listed below. Please note that Office 2010 is available in both a 32-bit version and a 64-bit version, but some NAV areas are currently not supported in the 64-bit version. The recommended version of Office 2010 in combination with NAV is the 32-bit version. Further reading on the difference between the two versions can be found here: http://blogs.technet.com/b/office2010/archive/2010/02/23/understanding-64-bit-office.aspx.  

    1. Employee Portal is supported for SharePoint 2010. However please look at KB970502 for instructions on how to install in a 64-bit environment.
    2. Sending data from Microsoft Dynamics NAV to both Word and Excel using the basic export is fully compatible with Microsoft Office Word 2010 and Microsoft Office Excel 2010. The same applies exporting to Excel from reports and to Export of budgets, Analysis Schedules etc.
    3. Interactions such as letters can be initiated from Microsoft Dynamics NAV and stored as appropriate in Microsoft Office Word 2010 in both 32-bit and 64-bit version.
    4. Sending emails from Microsoft Dynamics NAV is compatible with Outlook 2010 32-bit version, but is currently not supported for the 64 bit version.
    5. Outlook Synchronization is compatible with Outlook 2010 32-bit version. The installation and the add-in is not currently supported for the 64- bit version.
    6. Email logging is dependent on CDO, which is not supported in Office 2010. Please read http://support.microsoft.com/kb/2028411. A possible workaround has been identified by manual installing CDO in combination with KB2291071, but it is recommended to stay on Office 2007 if email logging is required.
  • Microsoft Dynamics NAV Team Blog

    New How Do I Videos for Microsoft Dynamics NAV on MSDN

    • 0 Comments

    Announcing the next installment of new videos on MSDN. http://msdn.microsoft.com/bb629407.aspx

    These videos target the developer audience for Microsoft Dynamics NAV 2009. The new offerings are:

    • Multiple Web Service Instances in NAV 2009
    • Delegation with Three Tier Installation in NAV 2009

    More videos are in the works and will target both the platform and the application, so check back often to see what's been added. All videos are in English.

  • Microsoft Dynamics NAV Team Blog

    Compatibility Update with Microsoft SQL Server 2008 R2 and Microsoft Visual Studio 2010

    • 2 Comments

    A couple of big Microsoft products shipped recently, so time for an NAV compatibility update.

    Microsoft SQL Server 2008 R2

    We are proud to announce that both Microsoft Dynamics NAV 5.0 SP1 Update 2 and Microsoft Dynamics NAV 2009 SP1 are compatible with Microsoft SQL Server 2008 R2!

    We will be updating our Microsoft Dynamics NAV 2009 SP1 Requirements List on MSDN shortly.

    Business Notification is not compatible with Microsoft SQL Server 2008 R2, and will not be supported. For instructions on how to install Business Notification with SQL Server 2008 see this blog post. For more information please look at the Statement of Direction for Microsoft Dynamics NAV available on PartnerSource for Microsoft Dynamics.

    Microsoft Visual Studio 2010

    You can use Microsoft Visual Studio 2010 for .NET integration scenarios with Microsoft Dynamics NAV, including consuming Microsoft Dynamics NAV 2009 Web Services.

    Microsoft Visual Studio 2010 is not compatible and not supported for editing Reports for the Microsoft Dynamics NAV 2009 RoleTailored Client. Microsoft Dynamics NAV 2009 SP1 uses the Microsoft RDLC 2005 format for reports which is not compatible with Microsoft Visual Studio 2010. See our earlier blog post on this topic for more details.

    Thanks,

    Michael Svanholm Thomsen, Group Program Manager, Microsoft Dynamics NAV Server and Tools 

  • Microsoft Dynamics NAV Team Blog

    Hotfix released for “Full Screen” mode with the RoleTailored Client

    • 0 Comments

    Two new command line parameters have been introduced for the RoleTailored client of Microsoft Dynamics NAV 2009 SP1 as a hotfix (KB 2312984). They enable a number of new usage scenarios for the RoleTailored client.

    Samples for those scenarios are: point of sales, point of information screens, and monitor screens showing self-updating key performance indicators.

    Command line parameter

    Description

    -Fullscreen

    If used on the Command line with the RoleTailored client, sets the new instance into a mode that shows all pages in full screen mode. In this mode by default no Navigation Window is shown.

    The full screen mode is designed to be used together with a RunPage URL.

    -ShowNavigationPage:0/1

    When used with 0, the Navigation Window is not shown on start up. 1 is default for the standard mode of the RoleTailored client. 0 is default in full screen mode.

    If you want to learn more about these options, please refer to this Blog Post.

    Christian Abeln
    Senior Program Manager
    Microsoft DynamicsNAV

  • Microsoft Dynamics NAV Team Blog

    Multiple Record Corruption on a Native Database: The “Table Isolation” Trick

    • 1 Comments

    Due to unexpected events, a multiple record corruption at table level in a Native database may unfortunately happen. The error that may arise is something like this (reported below in Danish) while performing actions on determined records in the corrupted area.

    corruption

    This error text is taken directly from the fin.stx file. For example:

    // ÚÄ´ DB ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿

    // ³ ÀÄÄÄÄÙ                                                                   ³

    // ³  Database System                                                         ³

    // ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

    @1@19@0@

    @2@1@0@

    Caution: There is an error in the database structure. This occurs if the database file is changed by another program or if a device driver does not function properly.

    You must correct this error before you can continue. The error (%18 in module %23) may have been caused by the computer or a program.

    Table: %1.1

    Company: %1.9

    Key Fields: %6

    Check the database. On the File menu, click Database, click Test, and then click Maximum. If you get the same error, you should:

    1. Back up the database by copying the database file or files to another location.
    2. Use the built-in functionality to make a backup.
    3. If this works, create a new database without deleting the database that contains the error or errors.

    Restore the backup that you made with the built-in backup functionality into the new database. To test it, on the File menu, click Database, click Test, and then click Maximum.

    If this procedure does not work, then any database changes that were made after the most recent backup will be lost. Restore the most recent backup that was made with the built-in backup functionality and test it.

    For security reasons, you should save the old database until you have used the new one for a period of time.

    Contact your system administrator for assistance.

    The official position from Microsoft, then, is to restore a valid recent backup or a copy of the database not affected from this error. But what if you do not have any of those?

    There are some chances to isolate those corrupted records, like cancer cells, and create a brand new database with only the sane part of the old one. I have called this “Table Isolation” trick, observing it from a medical perspective.

    This action plan could be applied if:

    1. You can access safely the database and work in most of the area.
    2. You know exactly which table(s) is/are affected and those are in a limited number.
    3. Those tables have the table property DataPerCompany set to Yes.

    If those 3 prerequisites can be considered fulfilled then you could go with the table isolation trick.

    NOTE: In the next example we take into considerations the corruption of multiple records within table 37 Sales Line for one specific company.

    “TABLE ISOLATION” plan

    1. Create a brand new table XXXX that has got the same table structure as the corrupted table e.g. 37 Sales Line table. (This brand new table must have the same fields and data types, there should even be no need to copy C/AL Code and triggers on it.)
    2. TRANSFERFIELDS ALL the records of Sales line table to the brand new created XXXX table for ALL the companies. (For the Sales Line records of the company that are having this problem, you should go with trial and error to recover as much sane records as possible.)
    3. Delete ALL the records for the Sales Line table for ALL the companies EXCEPT the one that has got the corruption in the OLD database.
    4. Perform a NAV backup of all objects + data common to all companies + ALL the companies EXCEPT the one with the table whom has got the error.
    5. Create a brand new database with the appropriate space (we can call it NEW database).
    6. Restore the NAV backup at point 4. (Now, in the NEW database you just miss data of one company.)
    7. After the NAV restore, TRANSFERFIELDS back all the records from table XXXX to Sales Line for every company and after that DELETE all records in table XXXX.
    8. Go back to the OLD database. Go to the Object Designer and change the property of the Sales Line table DataPerCompany to ‘No’. Save and Compile the table object.
    9. Perform a NAV backup of ONLY the company that still remains. (From the operation done at point 8, this won’t import the corrupted table).
    10. Restore the NAV backup at point 8 into the NEW database. (You should have now in the NEW database, all except the corrupted table. But the sane records are still in table XXXX.)
    11. TRANSFERFIELDS back all the records that you have been able to save into table XXXX to Sales Line of this last company restored and then DELETE all records present in table XXXX.
    12. DELETE table n. XXXX.

    At the end of this procedure, remember to run a FULL NAV database test and correct all the error that may arise.

    Remember also to correct all the dependencies left by the missing record and, overall, PLEASE before do this in live environment, always TEST it on a safe test environment.

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

    Best Regards,

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Segment Wizard for RTC

    • 0 Comments

    It is known that in NAV 2009 SP1 there is no Segment Wizard page for RTC.

    In this blog you will find some source code in txt format in order to let you start develop the Segment Wizard to your RTC. Please, check the disclaimer on code usage at the bottom of this blog.

    The source code file includes 1 new object, the Segment Wizard RTC page (Page 50112). Import this object into the Classic client. Next, you must slightly modify 2 objects in order to let the wizard work properly:

    • Table 5096 Segment Wizard Filter (change one line in StartWizard function to run Segment Wizard RTC page)
    • Page 5091 Segment (Add and promote action Wizard…)

    To modify Table 5096 Segment Wizard Filter:

    1. In Object Designer, click Table, select table 5096, Segment Wizard Filter, and then click Design.
    2. On the View menu, click C/AL Code.
    3. In the C/AL Editor, scroll down to the StartWizard function, and update the function to the following code:

    "Wizard Step" := "Wizard Step"::"1";

    INSERT;

    IF ISSERVICETIER THEN

      PAGE.RUNMODAL(PAGE::"Segment Wizard RTC",Rec)

    ELSE

      FORM.RUNMODAL(FORM::"Segment Wizard",Rec);

    • Close the C/AL Editor.
    • Save and compile Table 5096.

    To modify Page 5091 Segment:

    1. In Object Designer, click Page, select page 5091, Segment, and then click Design.
    2. In Page Designer, scroll down to the first blank line, and then on the View menu, click Actions.
    3. Insert a new action under the Functions ActionGroup. This action should have the following properties:
      • Name: aWizard
      • Caption: Wizard…
      • Type: Action
      • Image: SuggestLines
      • Promoted: Yes
      • PromotedCategory: Process
      • PromotedIsBig: Yes
    4. On the View menu, click C/AL Code.
    5. In the C/AL Editor, find the OnAction trigger for the aWizard action and add the following line of code:

    Wizard; 

    • Close the C/AL Editor
    • Save and compile Page 5091.

    This is brief and introductive screenshot step by step of what this page object does.

    To start the Wizard…, user has got a promoted Action.

    segment1

    When Clicking the action, the Wizard starts presenting STEP 1.

    segment2

    Checking the completion of Step 1, user is prompted for Step 2 meanwhile the Start action button appears.

    segment3

    User can choose to start the process (like Finish button in classic client) or move forward to the next step.

    NOTE that the mechanisms of keepin’hide and visible will always keep MAX 2 FastTab opened, increasing the visibility / usability of the wizard.

    segment4

     

    User has got the same options that has been present in the Classic Client and can switch between them by checking/unchecking the “Step X Completed” button.

    segment5

    When User is satisfied with his own choice, then he just has to press Start action button…

    segment6

    …and the population/reduction/refinement of the segment is served!

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

    Best Regards,

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Let NAV Speak (with a Simple and Useful Client Add-in)

    • 8 Comments

    In this blog you will find the source code (below) to “let NAV speak.” You would have a wide range of possibilities to use this simple Add-in and enlarge this project.

    If you want to know more about Client Add-ins you can refer to this MSDN link:

    Extending the RoleTailored Client Using Control Add-ins and Microsoft Dynamics NAV 2009 SP1

    This simple Client Add-In is based on System.Speech namespace:

    Microsoft.Speech.Synthesis Namespace

    Step by step creation of the NSpeech Add-In

    (Remember the ‘DodgeBall’ rules: Develop, Sign, Place, Register and Develop)

    1. DEVELOP your add-in (in Visual Studio)
    2. Strong SIGN and build
    3. PLACE DLLs into Add-ins folder
    4. REGISTER the add-in in Table 2000000069, Client Add-in
    5. DEVELOP your C/AL code (in Object Designer)

    A. Create a New Class Project

    1. Open Visual Studio (in this example I am using Visual Studio 2010)
    2. Create a New Project (CTRL+SHIFT+N) with these parameters
      • Visual C# – Windows
      • Class library
      • .NET Framework 3.5
      • Name: NSpeech
      • Location: C:\TMP (or whatever location you like)
      • Solution Name: NSpeech
      • Create directory for solution

    NSpeechVS

    B. Create a Strong Name Key (SNK)

    1. Go to Project > Properties (NSpeech Properties…)
    2. From the Project Properties form go to the Signing tab
    3. Tick the Sign the assembly option
    4. Create a New SNK (e.g. TestSpeechNav.snk)

    NSpeechSign

    C. Add References to the Project

    1. Click on the Class1.cs tab (return to the project)
    2. In the Solution Explorer window select Reference, right Click, Add Reference
    3. Add reference to
      • Microsoft.Dynamics.Framework.UI.Extensibility (Version 1.3.0.0) (By default, the path to the assembly is C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client)
      • System.Drawing (Version 2.0.0.0)
      • System.Speech (Version 3.0.0.0)
      • System.Windows.Forms (Version 2.0.0.0)

    NSpeechRef

    D. Develop your NSpeech Project

    (You can simply copy and paste this code into your Class project.)

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.ComponentModel;

    //Add a reference to the Add-in API (see the solution explorer) and all relevant references

    //Use all relevant references

    using System.Drawing;

    using System.Windows.Forms;

    using Microsoft.Dynamics.Framework.UI.Extensibility;

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

    //this is to let this add-in speech

    //http://msdn.microsoft.com/en-us/library/dd146744(v=office.13).aspx

    using System.Speech;

    using System.Speech.Synthesis;

    namespace NSpeech

    {

        //Develop the control add-in class.

        //Assign a name to the control add-in (MyCompany.MyProduct.MyAddIn)

        [ControlAddInExport("Cronus.DynamicsNAV.NSpeech")]

        [Description("Let this Add-in Speak")]

      

        //Select a base class as a starting point.

        //Select interfaces to implement features, such as data binding or event handling.

        public class Class1 : StringControlAddInBase

        {

            //Implement control creation

            protected override Control CreateControl()

            {

                //Create a brand new TextBox

                TextBox control = new TextBox();

               

                //Define TextBox size

                control.MinimumSize = new Size(50, 0);

                control.MaximumSize = new Size(500, Int32.MaxValue);

               

                //Add a DoubleClick event for the TextBox

                control.DoubleClick += new EventHandler(control_DoubleClick);

                return control;

            }

            //Define a voice synth

            private SpeechSynthesizer synth;

            private void control_DoubleClick(object sender, EventArgs e)

            {

                //create a new speech synth and set default audio device

                synth = new SpeechSynthesizer();

                synth.SetOutputToDefaultAudioDevice();

               

                //Pass TextBox content in a string variable

                string data = this.Control.Text;

              

                //... and let NAV speak it!

                synth.SpeakAsync(data);

            }

        }

    }

    E. Build the NSpeech.dll

    1. Once you have all setup, you are ready to build your Client Add-In. Go to Build > Build NSpeech

    F. Place DLL into Add-in folder

    1. Locate/copy/paste NSpeech.dll (should be in your C:\TMP\NSpeech\NSpeech\bin\Debug folder) to the Add-ins folder of a machine where the RoleTailored client has been installed

    (typically the Add-ins folder is here: C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client\Add-ins)

    G. Determine the PKT (Public Key Token) of NSpeech

    1. Launch the Visual Studio Command Prompt
    2. In the VSCP:

    Sn –T “C:\TMP\NSpeech\NSpeech\bin\Debug\NSpeech.dll”

    In the following example, 250f71f35a467631 is the PKT (Public Key Token) needed to register the Add-in into NAV. (You will have another value.)

    NSpeechSn

    H. Register the NSpeech dll

    1. Open Classic Client
    2. Open Object Designer (SHIFT+F12)
    3. Select Table object (ALT+B)
    4. Run Table 2000000069 Client Add-in
    5. Insert a new line with these values:
    Field Value
    Control Add-in Name Cronus.DynamicsNAV.NSpeech
    Public Key Token 250f71f35a467631 (this is an example)
    Version 1.0.0.0
    Description Let this Add-in Speak

    How to Use This Add-in

    As an example, you can just let NAV speak the content of the field “Name” in Customer Card page (Page 21).

    1. Open Classic Client
    2. Go to Object Designer (SHIFT+F12)
    3. Select Page object (ALT+G)
    4. Design Page 21 Customer Card
    5. Go to Name Field and Edit properties (SHIFT+F4)
    6. Fill the ControlAddIn property with this value Cronus.DynamicsNAV.NSpeech;PublicKeyToken=250f71f35a467631 (change the PublickKeyToken value to the one that you have determined at step G.)
    7. Save and compile the page (CTRL+S)

    Now…you are ready to let NAV speak the Customer Name from the customer card by simply double clicking on on the Name!

    This simple Client Add-in project may be used in, e.g.

    • Speak an alert if the availability of an Item is lower than expected in a document page (e.g. sales quote)
    • Speak an alert if a Customer exceeds assigned Credit Limit
    • Speak internal comments for an item, a vendor, a customer, wherever this is needed
    • … and many more

    This simple Client Add-in project may be enlarged, e.g.

    • It could be possible to set the volume of the voice
    • It could be possible to set the rate of the voice
    • It could be possible to select another voice instead of “Microsoft Anne” default in order to speak words with proper accent language
    • It could be possible to save a .wav file instead of speaking it or even perform both activities
    • … and many more

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

    Best Regards,

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Making a Page or Report Available from Search in the RoleTailored Client

    • 0 Comments

    In the RoleTailored client, the Search feature finds only pages and reports that are accessible from the navigation pane, which includes the Home button, Activity buttons, and Departments. So if you want to make a page or report available from search, then add it to the Home button, an Activity button, or Departments.

    For information about adding pages and reports to the Home Button and Activity buttons, see Home Button Overview and Creating Activity Buttons for the Navigation Pane in the MSDN library.

    To add a page or report to Departments, you add it to the MenuSuite object that is used by the RoleTailored client. For more information, see How to: Create and Modify a MenuSuite Object in the MSDN Library.

     

  • Microsoft Dynamics NAV Team Blog

    How to Transform a ListPlus Page Into a FactBox

    • 0 Comments

    In several places in NAV 2009 SP1, it has been used ListPlus pages in order to display two-dimension matrix. Those ListPlus Pages may be customized in order to be arranged as FactBoxes directly inside a main page (Document, Worksheet, etc.).

    The main concept of those kind of two-dimensional matrix pages is that they have a Page Part with a List that is updated every time a value is changed in the analysis parameter bounded to fields and/or variables that belongs directly to the ListPlus.

    This post will provide the basics on how to integrate the Item Availability by Location directly as FactBoxes instead of being called from RTC actions. The same concept may be applied to Item Availability by Period and Item Availability by Variant (and/or all of them together). In the example, the Planning Worksheet page is used as the main page.

    listplus1

    The next step will guide you through the modifications that need to be performed in order to arrange Page 492 “Item Availability By Location” as a FactBox. (In the standard Cronus this is called from an action present in the Related Information action group.)

    1. Rearrange Matrix Lines and configure Style property
      1. Design page 515 “Item Avail. by Location Lines”
      2. Below the Container line, add a new line of Field type. Fill in a name (e.g. “ItemNo”), a caption (e.g. “Item”) and populate SourceExpr property with Item.”No.” + ‘ ‘ + Item.Description
      3. Add some Style management: for this line change the Style property to “Favorable” and StyleExpr to TRUE

        listplus2

      4. In order to display in bold Matrix cells that contain values different from 0, add the following Boolean global variables (one for every possible Matrix Column). It is very important that for every Boolean variable, you also set the property (SHIFT+F4) “IncludeInDataset” to Yes.

        GRBool (for GrossRequirement StyleExpr)

        SRBool (for ScheduledReceipt StyleExpr)

        PORBool (for PlannedOrderReceipt StyleExpr)

        PABBool (for ProjAvailBalance StyleExpr)

        InvBool (for Item.Inventory StyleExpr)

        QPOBool (for Item."Qty. on Purch. Order" StyleExpr)

        QSOBool (for Item.”Qty. on Sales Order” StyleExpr)

        TOSQBool (for Item.”Trans. Ord. Shipment (Qty.)” StyleExpr)

        QTBool (for Item.”Qty. in Transit” StyleExpr)

        TORQBool (for Item.”Trans. Ord. Receipt(Qty.)” StyleExpr)

        EIBool (for ExpectedInventory StyleExpr)

        AvInvBool (for QtyAvailable StyleExpr)

        SRQBool (for Item.”Scheduled Receipt(Qty.)” StyleExpr)

        SNQBool (for Item.”Scheduled Need (Qty.)” StyleExpr)

        PORLBool (for PlannedOrderReleases StyleExpr)

        NetChBool (for Item.”Net Change” StyleExpr)

        listplus3 

      5. Create a new Function called “InitBoolean” and add this code:

        GRBool := GrossRequirement <> 0;

        SrBool := ScheduledReceipt <> 0;

        PORBool := PlannedOrderReceipt <> 0;

        PABBool := ProjAvailBalance <> 0;

        InvBool := Item.Inventory <> 0;

        QPOBool := Item."Qty. on Purch. Order" <> 0;

        QSOBool := Item."Qty. on Sales Order" <> 0;

        TOSQBool := Item."Trans. Ord. Shipment (Qty.)" <> 0;

        QTBool := Item."Qty. in Transit" <> 0;

        TORQBool := Item."Trans. Ord. Receipt (Qty.)" <> 0;

        EIBool := ExpectedInventory <> 0;

        AvInvBool := QtyAvailable <> 0;

        SRQBool := Item."Scheduled Receipt (Qty.)" <> 0;

        SNQBool := Item."Scheduled Need (Qty.)" <> 0;

        PORLBool := PlannedOrderReleases <> 0 ;

        NetChBool := Item."Net Change" <> 0;

      6. Add the Boolean value initialization in the OnAfterGetRecord() trigger at the bottom

        ExpectedInventory := AvailabilityMgt.ExpectedQtyOnHand(Item,TRUE,0,QtyAvailable,31129999D);

        END;

        InitBoolean; //Add this line

      7. For last, let this code work. In Page Designer, on each field for which you created a Boolean variable, change the Style property to “Strong” and in the StyleExpr property add the respective Boolean variable that you created in step d.
      8. Save and Compile the page.

       

    2. Add Availability by Location FactBox to Planning Worksheet.
      1. Design page 99000852 Planning Worksheet
      2. Go to last line and add a new Part type. Give this a name (e.g. IALL) and a caption (e.g. Availability By Location) and in the Properties for the line, fill in the PagePartID with “Item Avail. by Location Lines”
      3. Save and compile the page.

       

    3. Add the controls and code to update dynamically the Availability by Location FactBox
      1. Design page 99000852 Planning Worksheet
      2. Add these global variables
        Name DataType Subtype Length Option String
        ItemForIALL Record Item    
        Calendar Record Date    
        ItemPeriodLength Option     Day,Week,Month,Quarter,Year,Period
        AmountType Option     Net Change,Balance at Date
        ItemNo Code   30  
        DescDateFilter Text   30  
      3. Add the controls to manage the options for the Availability by Location FactBox by inserting those lines below the Container

        listplus4

        Type: Group, SubType: Group, Caption: Availability Options

        Type: Field, Caption: View by, SourceExpr: ItemPeriodLength, Style: Unfavorable, StyleExpr: TRUE

        Type: Field, Caption: View as, SourceExpr: AmountType, Style: Unfavorable, StyleExpr: TRUE

        Type: Field, Caption: Period, SourceExpr: DescDateFilter, Editable: FALSE

      4. Create a new Function called UpdateSubForm() and add this code

        ..

        IF ItemForIALL.GET(ItemNo) THEN BEGIN

          FindPeriod('',ItemForIALL);

          CurrPage.IALL.FORM.Set(ItemForIALL,ItemPeriodLength,AmountType);

        END;

      5. Create a new Function called FindPeriod() with these values:

        FindPeriod(SearchText : Code[10];VAR ItemRec : Record Item)

        On the FindPeriod function, add a local variable:

        Name DataType Subtype
        PeroidFormMgt Codeunit PeriodFormManagement

        And add this code to the FindPeriod function:

        IF ItemRec.GETFILTER("Date Filter") <> '' THEN BEGIN

          Calendar.SETFILTER("Period Start",ItemRec.GETFILTER("Date Filter"));

          IF NOT PeriodFormMgt.FindDate('+',Calendar,ItemPeriodLength) THEN

            PeriodFormMgt.FindDate('+',Calendar,ItemPeriodLength::Day);

          Calendar.SETRANGE("Period Start");

        END;

        PeriodFormMgt.FindDate(SearchText,Calendar,ItemPeriodLength);

        IF AmountType = AmountType::"Net Change" THEN BEGIN

          ItemRec.SETRANGE("Date Filter",Calendar."Period Start",Calendar."Period End");

          IF ItemRec.GETRANGEMIN("Date Filter") = ItemRec.GETRANGEMAX("Date Filter") THEN

            ItemRec.SETRANGE("Date Filter",ItemRec.GETRANGEMIN("Date Filter"));

        END ELSE

          ItemRec.SETRANGE("Date Filter",0D,Calendar."Period End");

        DescDateFilter := ItemRec.GETFILTER("Date Filter");

      6. Now you only need to add the code to let the Availability by location FactBox act like the original ListPlus page. To do so, you just have to copy paste those functions (and obviously code inside) from Page 492 “Item Availability by Location” and paste them into the functions of the Planning Worksheet page.

        PeriodItemPeriodLengthOnPush

        YearItemPeriodLengthOnPush

        QuarterItemPeriodLengthOnPush

        MonthItemPeriodLengthOnPush

        WeekItemPeriodLengthOnPush

        DayItemPeriodLengthOnPush

        NetChangeAmountTypeOnPush

        BalanceatDateAmountTypeOnPush

        DayItemPeriodLengthOnValidate

        WeekItemPeriodLengthOnValidate

        MonthItemPeriodLengthOnValidat

        QuarterItemPeriodLengthOnValid

        YearItemPeriodLengthOnValidate

        PeriodItemPeriodLengthOnValida

        NetChangeAmountTypeOnValidate

        BalanceatDateAmountTypeOnValid

      7. Once you have copied all this function, it’s needed to substitute all the FindPeriod(‘’); statement with FindPeriod(‘’,ItemForIALL); (You can simply use CTRL+H, Replace build in function).
      8. For refinement, you need to add in the OnOpenPage() trigger, in the bottom, this code

        ...

          ERROR('');

        ReqJnlManagement.OpenJnl(CurrentWkshBatchName,Rec);

        FindPeriod('',ItemForIALL); //Add this line

        And in the OnAfterGetRecord(); trigger, in the bottom, this code

        PlanningWarningLevel1OnFormat;

        ItemNo := "No."; //Add this line

        UpdateSubForm; //Add this line

      9. Save and compile the page.

       

    4. Add the Period Actions to browse through Periods in the Availability by Location FactBox
      1. Design page 99000852 Planning Worksheet
      2. Go to Last line(the first blank line) of the page and click SHIFT+F4 (edit Properties of the page)
      3. Change the property PromotedActionCategoriesML into ENU=New,Process,Reports,Availability Periods
      4. Close the Page properties window
      5. Go to last line of the page and click on View > Actions
      6. Go to last line and add one action group and two actions like these

        listplus5

        Type: ActionGroup, Caption: Availability

        Type: Action, Caption: Previous Period, Image: PreviousRecord, Promoted: Yes, PromotedCategory: Category4, ShortCutKey: CTRL+Q

        Type: Action, Caption: Next Period, Image: NextRecord, Promoted: Yes, PromotedCategory: Category4, ShortCutKey: CTRL+W

      7. Save and compile the page.

    Right now you have completed all the steps necessary to create a FactBox for Item Availability by Location.

    Attached you will find a .txt file with the example above, extended to Item availability by Location, by Period and by Variant too. Captions have been added for ENU and ITA.

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

    Best Regards,

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    New Release of the Application Test Toolset

    • 0 Comments

    A new release of the Application Test Toolset for Microsoft Dynamics NAV 2009 SP1 is available on PartnerSource. This toolset builds on top of the testability features that were released with Microsoft Dynamics NAV 2009 SP1. These features add test capabilities to the development environment, the C/AL language, and the runtime platform. They enable the adoption of a test-driven development style and the development of automated test suites that execute fast and reliably.

    The main theme of this new release is the addition of a significant body of C/AL tests. Overall, it includes:

    • 226 application tests (covering areas such as service management, sales, purchasing, inventory management, jobs, and finance)
    • Application-specific test libraries (e.g., creation functions)
    • Generic test libraries (e.g., assertions, logging)
    • Backup management
    • Test case management

    Keep an eye on this blog for more posts on testing NAV solutions in the coming weeks.

     

    Bas Graaf

  • Microsoft Dynamics NAV Team Blog

    Now Available: Microsoft Dynamics NAV How Do I videos on MSDN

    • 2 Comments

    Check out the new videos on MSDN. http://msdn.microsoft.com/bb629407.aspx. These videos target the developer audience for Microsoft Dynamics NAV 2009 SP1. The current offerings include:

    • Outlook Synchronization Configuration
    • Warranty Lots in Warehouse Management
    • Revaluation Journal Process for Inventory
    • Expiration Lots in Warehouse Management
    • Exact Cost Reversal

    More videos are in the works and will target both the platform and the application, so check back often to see what's been added. All videos are in English.

     

Page 30 of 48 (719 items) «2829303132»