Microsoft Dynamics NAV

Team Blog

May, 2014

  • Microsoft Dynamics NAV Team Blog

    Using the Quick Filter in Microsoft Dynamics NAV

    • 12 Comments

    Many of you that have installed Microsoft Dynamics NAV 2013 R2 have for sure noticed that the quick filter behavior has been redesigned in this release and that is why, in this post, we will go through all the changes and the intention behind them.

     

    So let’s start with a bit of history; the first version of the quick filter was released in the Microsoft Dynamics NAV 2009 Windows client, where we replaced the filter window available in the development environment with a filter pane integrated on all Microsoft Dynamics NAV pages. Here the user both has the option of entering filter criteria as plain text and the ability of composing an advanced filter. If you would like to quickly search for a certain record, the recommended practice is to use the quick filter.

    Let’s say, for example, that we want to find a contact in the contact list starting with “Man”. We can construct the filter by selecting the Name field and entering the text “man” in the search field.

    Notice that all the contacts starting with “man” now appear in the results list. How is this working? Whatever we add to this filter will be internally translated to a string by adding ‘@’ in front and ‘*’ in the end. So our filter string ‘man’ becomes ‘@man*’ and the Windows client filters for any contact name that starts with “man” in upper or lower case.  

    The following table illustrates more Quick Filter search examples in Microsoft Dynamic NAV 2013.

    Search Criteria

    Interpreted as…

    Returns…

    Man

    @man*

    All records that start with the string man and case insensitive.

    Se

    @se*

    All records that start with the string se and case insensitive.

    Man*

    Starts with Man and case sensitive

    All records that start with the string Man

    'man'

    An exact string and case sensitive

    All records that match man exactly

    *1

    Ends with 1

    All records that end with 1

    @*man

    Ends with and case insensitive

    All records that end with man

    @man*

    Starts with and case insensitive

    All records that start with man

    As part of our development process we regularly perform usability studies and some of them showed the users instinctively thought of the quick filter as a search field and that is why we decided to modify the quick filter behavior to a “contains” rather than a “starts with”. So what does this mean?

    Let’s construct the same filter in the Microsoft Dynamics NAV 2013 R2. Notice that the search results list includes contact names which start with “Man” and even have “Man” in the middle of the name. 

    What has changed? The entered filter will be translated to a string by adding ‘@*’ in front and ‘*’ in the end. So our filter string ‘man’ becomes ‘@*man*’ and the Windows client filters for any contact name that contains “man” in upper or lower case.  

    To start with in the RTM version of Microsoft Dynamics NAV 2013 R2 we have considered the simple user approach where the special characters in the filter criteria are ignored. However, in the Cumulative Update 13 for Microsoft Dynamics NAV 2013, we have refined the user experience and now respect the entered filter criteria.

    The following table illustrates the Quick Filter search examples for the Cumulative Update 13 and later for Microsoft Dynamics NAV 2013.

    Search Criteria

    Interpreted as…

    Returns…

    Man

    @*man*

    All records that contain the string man and case insensitive.

    Se

    @*se*

    All records that contain the string se and case insensitive.

    Man*

    Starts with Man and case sensitive

    All records that start with the string Man

    'man'

    An exact string and case sensitive

    All records that match man exactly

    *1

    Ends with 1

    All records that end with 1

    @*man

    Ends with and case insensitive

    All records that end with man

    @man*

    Starts with and case insensitive

    All records that start with man

    We encourage you to check out the Cumulative Update 13 and we hope that this blog demystifies some of the behavioral differences of the quick filter across Microsoft Dynamics NAV product versions.

  • Microsoft Dynamics NAV Team Blog

    Zetadocs Express zero-client install option: One add-in for all

    • 0 Comments

    It’s becoming less desirable to install any client side software and ease of deployment is becoming a key factor when choosing software. Modern software needs hybrid options and using deployment methods like ClickOnce, it looks likely to remain that way - for a while longer at least.

    Equisys has now released an update to Zetadocs Express that includes the option of a Document FactBox installed on the server than runs Microsoft Dynamics NAV server to support the Microsoft Dynamics NAV Web client. It is also automatically available to the Microsoft Dynamics NAV Windows client, deployed remotely using ClickOnce, and Microsoft Dynamics NAV Windows clients that are installed directly on the desktop. This cross-client support now gives partners the option of zero client-side software deployment to achieve simple document management across all Microsoft Dynamics NAV clients.

    Touch and Choose

    One of the main benefits of Zetadocs Express is the ability to drag and drop related documents which are stored in the electronic archive for viewing in context within Microsoft Dynamics NAV. However, drag and drop to capture is very much a Windows invention for enhanced usability.

    A Microsoft Dynamics Web client in a browser on a tablet makes that more complicated, especially when you want to drag and drop emails and attachments from Outlook to Microsoft Dynamics NAV records. That sort of action - between two separate programs - is just not possible yet in the web world, especially with most touch devices.

    Consequently touch and choose was born as the way to add documents in the Microsoft Dynamics NAV Web client, which works just as well irrespective of the device you happen to be using.

    Coexistence

    If PC-based users using the Microsoft Dynamics NAV Windows client want the ability to capture emails using drag and drop from Outlook they can with an additional client-side install.

    The Zetadocs Document FactBox detects whether the Zetadocs Client is installed locally on the desktop, and if so it automatically shows the additional drag and drop functionality and Outlook email integration.

    Both add-ins happily coexist in the same Microsoft Dynamics NAV system - you just need to decide if the additional functionality is needed by the client and install Zetadocs Client on those desktops that need it.

    Try it today

    Zetadocs Express is the foundation member of the Zetadocs for the Microsoft Dynamics NAV family of products available at no additional cost to users of Microsoft Dynamics NAV 2013 & Microsoft Dynamics NAV 2009 on a Business Ready Enhancement Plan, download it and try it with the Microsoft Dynamics NAV 2013 R2 Web client today!

  • Microsoft Dynamics NAV Team Blog

    Journal Error Processing

    • 0 Comments

    Today’s pattern changes the paradigm of how we’ve done error processing in Microsoft Dynamics NAV earlier by providing less-intrusive, more user-productive error processing.

    Meet the Pattern

    This pattern describes an optimized way to handle invalid, incomplete, or inconsistent data that users enter in journals.

    Know the Pattern

    Scenario: A user has entered data on a journal line and proceeds to invoke a processing action on it, such as posting or exporting to electronic payments. Microsoft Dynamics NAV validates the data before it is committed. If any validation errors are found, the user must be informed of validation errors in the most optimal way.

    One design is that when an error is found, stop execution and prompt the user to correct the error. After correcting the error, the user restarts processing and is stopped again at the next error, and so on. Stopping and showing each error is time-consuming and frustrating for the user.

    Another design is that processing does not stop when an error is found. Instead, all errors are gathered in a table and displayed all at once at the end of processing. This way, the processing is ideally invoked only once, reducing the time and effort spent by the user to expose and correct all data validation errors.

    In both designs, the processing is not finalized if any errors are found (for example, exporting to electronic payments is not done, until the data error is resolved).

    This document describes how to implement the second error-handling design: Showing all errors at the end.

    Use the Pattern

    The example below comes from the implementation of SEPA Credit Transfer.

    After setting up SEPA-specific configurations, the user can start entering vendor payments that will later be exported to the payment file. (The setup depends on the country, but generally involves choosing number series for SEPA export files, choosing the export format, and enabling SEPA Credit Transfer.)

    In the W1 solution (and most of the country-/region-specific versions), payment lines are created in the Payment Journal page, from where the user can invoke the Export Payments to File action, which will attempt to create a SEPA-compliant XML file containing the description of the journal payments that are to be made by the bank.

    When the Export Payments to File function is invoked, Microsoft Dynamics NAV validates the journal line data. If the data must be completed or updated, then no file will be created and the user sees the following message:

    To give a visual overview, the lines that need corrections are highlighted in red. The factbox is context-sensitive, meaning that it shows only the errors that relate to the currently selected line.

    When the first payment journal line is selected, the FactBox show errors for the first line.


    When the second payment journal line is selected, the FactBox shows errors for the second line. 


    Application Objects

    In the following table, the Generic Object column contains the objects that you can use as a base for your implementation.

    Generic Object

    Description

    Sample W1 implementation of SEPA Credit Transfer*

    Journal Page

    This is the journal list page where the user invokes the processing action.

    Payment Journal

    Action on Page

    The processing action invoked by the user on the journal list page.

    Export Payments to File

    Errors Page List Part

    A FactBox that displays any journal line validation errors.

     

    To improve user experience, the developer can highlight the lines with errors in red and conveniently sort the lines with errors at the top.

    Payment Journal Errors Part

    Validation codeunit

    Contains code that checks that the journal line contains correct, complete, and coherent data and that the line is ready for whatever process must be done next.

    SEPA CT-Check Line

    Processing codeunit

    Executes the processing of the journal lines.

    SEPA CT-Export File

    Journal Error Text Table

    Contains

    • The error messages
    • Link information about where the error messages belong. For example, in table 1228, Payment Jnl. Export Error Text, the error is linked uniquely to a journal line by the following fields:
      • Journal Template Name, with TableRelation="Gen. Journal Template"
      • Journal Batch Name, with TableRelation="Gen. Journal Batch".Name WHERE (Journal Template Name=FIELD(Journal Template Name))
      • Journal Line No.

    Other related information can be added, such as document number of the original source document, if the current journal line originates from a document.

     

    An extra improvement would be to add a drilldown or a link to the page where the user can fix the error. This would significantly simplify the scenario by excluding manual navigation and investigation by the user to find the page where the error can be fixed.

    Payment Jnl. Export Error Text

     

     * The W1 implementation of file export for SEPA Credit Transfer contains the generic SEPA functionality. However, due to differences in data models and user scenarios in various country implementations, the selected local versions contain adaptations of the generic functionality.

    Flow

    Find below a diagram describing the flow between the objects involved in the journal error processing.

    Code

    Following the flow above, the code (in the SEPA Credit Transfer example) is as follows.

    Read more on NAV Wiki...

    Best regards,

    The NAV Application Patterns team

  • Microsoft Dynamics NAV Team Blog

    Owner ID field became obsolete in Dynamics NAV

    • 0 Comments

    On MSDN it is written that the Owner ID field became obsolete and should be removed from specific pages. This means that anyone can start up the Windows Client and configure a Role Center without any restrictions. Reasoning behind this is explained in this small blog posting among a new approach that does give a better handling of this.

    The Owner ID was removed from the profile table during the multitenant work. The Profiles are in the application table and can’t have references to users which are in the tenants. The feature itself was not that well thought through. On all other records we have a last person saving wins.

    The proposed workaround / solution is to use a permission set per profile and use record level security to restrict access to that particular profile ID.

    To resolve the issue and get the old behavior back, you need to create a new Permission Set. E.g.:

    TEST PROFILE
    Following details:
    Object Type   Object ID        Object Name         R/I/M/D   Security FIlter
    Table Data     2000000072  Profile Metadata     Yes          Profile: Profile ID=ACCOUNTING MANAGER

    After logging on with a user in configuration mode that has two permission sets applied (BASIC and TEST PROFILE) with a profile called IT Manager, it is no longer possible to change the role center and make changes.

    Kindest regards,

    Marco Mels
    Microsoft Dynamics Netherlands

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Cumulative Update 7 for Microsoft Dynamics NAV 2013 R2 has been released

    • 9 Comments

    Cumulative update 7 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 R2. 

    The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    • AU - Australia
    • AT - Austria
    • BE - Belgium
    • CH - Switzerland
    • DE - Germany
    • DK - Denmark
    • ES - Spain
    • FI  - Finland
    • FR - France
    • IS - Iceland
    • IT - Italy
    • NA - North America
    • NL - Netherlands
    • NO - Norway
    • NZ - New Zealand
    • RU – Russia
    • SE - Sweden
    • UK - United Kingdom

    Where to find cumulative update 7

    You can download cumulative update 7 from KB 2964528 – Cumulative Update 7 for Microsoft Dynamics NAV 2013 R2 (Build 36703 - our apologies for originally posting the wrong build number).

    For a full list of all hotfixes included in cumulative updates for Microsoft Dynamics NAV 2013 R2, see the following CustomerSource and PartnerSource pages: 

    CustomerSource:

    PartnerSource

    More Information

    For more information about cumulative updates for Microsoft Dynamics NAV 2013 R2, see Announcement of update rollups for Microsoft Dynamics NAV 2013 R2

  • Microsoft Dynamics NAV Team Blog

    Cumulative Update 14 for Microsoft Dynamics NAV 2013 has been released

    • 2 Comments

    Cumulative update 14 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013. The cumulative update includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    • AU - Australia
    • AT - Austria
    • BE - Belgium
    • CH - Switzerland
    • DE - Germany
    • DK - Denmark
    • ES - Spain
    • FI   - Finland
    • FR - France
    • IS  - Iceland
    • IT   - Italy
    • NA - North America
    • NL - Netherlands
    • NO - Norway
    • NZ - New Zealand
    • SE - Sweden
    • UK - United Kingdom

    Where to find cumulative update 14

    You can download cumulative update 14 from KB 2964546 – Cumulative Update 14 for Microsoft Dynamics NAV 2013 (Build 36605).

    For a full list of all hotfixes included in the cumulative update, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

    PartnerSource:

  • Microsoft Dynamics NAV Team Blog

    Using C/AL Query Objects Instead of Nested Loops

    • 5 Comments

    After a bit of a delay, here is the latest Microsoft Dynamics NAV design pattern, brought to you by the NAV Design Patterns team.

    Meet the Pattern

    This pattern shows how the new query object type introduced in Microsoft Dynamics NAV 2013 allows you to replace costly loops when inspecting data from two or more tables.

    Know the Pattern

    One of the core operations in a relational database is joining two or more tables. For example, you might need to extract all sales lines in the database together with information regarding the related sales header. This requires joining the Sales Header and Sales Line tables using Sales Header No. as the connecting field.

    The join operation has traditionally been done in C/AL by record looping. When Microsoft Dynamics NAV 2013 introduced the query object, it allowed us to produce a data set that is the result of a join operation between two or more tables. This simplifies the problem of finding related records in two tables linked through a foreign key.

    Pattern Elements

    1.       Two or more tables that contain records linked through a foreign key: Table 1, Table 2, Table n.

    2.       A query object Query X, that joins Table 1, Table 2, etc. based on the connecting key.

    3.       A processing codeunit that loops through the query records (or any other code-bearing object).

    Pattern Steps

    1.       Run the query on the connected tables.

    2.       Loop through the records returned by the query.

    3.       Process the records. 

    The following  diagram illustrates the elements of the pattern.  

    Use the Pattern

    The Bank Acc. Reconciliation Line table (274) and the Bank Account Ledger Entry table (271) are connected through the Bank Account No. field. Identify the matching pairs of records based on having the same remaining amount and transaction date.

    Solution Using Nested Loops

    The classic C/AL approach is to:

    1.       Set the necessary filters on the left table, i.e. table 274.

    2.       Loop through the filtered records.

    3.       For each record in the filter, find the related records in the right table (table 271) and set the required filters on it.

    4.       For each pair of records from the left and right table, decide if they are a solution and if so, apply them to each other.

    VAR

      BankAccRecLine@1005 : Record 274;

      BankAccLedgerEntry@1006 : Record 271;

      BankAccEntrySetReconNo@1007 : Codeunit 375;

     

    BEGIN

      BankAccRecLine.SETFILTER(Difference,'<>%1',0);

      BankAccRecLine.SETRANGE(Type,BankAccRecLine.Type::"Bank Account Ledger Entry");

      IF BankAccRecLine.FINDSET THEN

        REPEAT

          BankAccLedgerEntry.SETRANGE("Bank Account No.",BankAccRecLine."Bank Account No.");

          BankAccLedgerEntry.SETRANGE(Open,TRUE);

          BankAccLedgerEntry.SETRANGE("Statement Status",BankAccLedgerEntry."Statement Status"::Open);

          BankAccLedgerEntry.SETFILTER("Remaining Amount",'<>%1',0);

          IF BankAccLedgerEntry.FINDSET THEN

            REPEAT

              IF (BankAccRecLine.Difference = BankAccLedgerEntry."Remaining Amount") AND (BankAccRecLine."Transaction Date" = BankAccLedgerEntry."Posting Date") THEN                        BankAccEntrySetReconNo.ApplyEntries(BankAccRecLine,BankAccLedgerEntry,  Relation::"One-to-One");

            UNTIL BankAccLedgerEntry.NEXT = 0;

        UNTIL BankAccRecLine.NEXT = 0;

    END;

    Solution Using a Query

    The new query-based approach involves:

    1.       Define a query that returns the full filtered join of tables 271 and 274.

    2.       Loop through the records returned by the query.

    3.       For each query record, decide if it represents a solution and then connect the two table records that formed it through an application.

    VAR

      BankRecMatchCandidates@1001 : Query 1252;

      BankAccEntrySetReconNo@1007 : Codeunit 375;

    BEGIN

    BankRecMatchCandidates.SETRANGE(Rec_Line_Bank_Account_No,BankAccReconciliation."Bank Account No.");

    BankRecMatchCandidates.SETRANGE(Rec_Line_Statement_No,BankAccReconciliation."Statement No.");

     

    IF NOT BankRecMatchCandidates.OPEN THEN

      EXIT;

     

    WHILE ...

     

    Read more on NAV Design Patterns Wiki...

    Best regards,

    Bogdan Sturzoiu, at Microsoft Development Center Copenhagen

Page 1 of 1 (7 items)