• No results found

DESIGN AND DEVELOPMENT BEST PRACTICES

In document Microsoft Dynamics NAV (Page 48-54)

An ISV solution should comply with the following best practices:

 Best Practice 9.1: The ISV should follow Microsoft Dynamics NAV architectural guidelines.

 Best Practice 9.2: The ISV solution should follow reporting guidelines.

 Best Practice 9.3: Sensitive data should be transported in an encrypted form.

 Best Practice 9.4: The ISV solution should properly handle time zones, especially when working with Microsoft Dynamics NAV web services.

 Best Practice 9.5: The ISV solution should not produce best practice tool errors.

 Best Practice 9.6: Company names should be properly encoded in web services URLs.

 Best Practice 9.7: The ISV solution should follow application performance best practices.

 Best Practice 9.8: The ISV solution should follow keyboarding best practices.

 Best Practice 9.9: ISV components running in the same web page as NPF components should not modify the DOM structure related to the NPF page.

 Best Practice 9.10: NPF applications should not throw exceptions on OnOpenForm trigger.

 Best Practice 9.11 NPF applications should provide automated scripts or instructions for SharePoint Farm deployments.

 Best Practice 9.12 Web client and Privacy of sensitive information in URLs

 Best Practice 9.13 Web client and Stylesheets

 Best Practice 9.14 Optimize Web client pages for usage with low bandwidth connections

9.1 THE ISV SHOULD FOLLOW MICROSOFT DYNAMICS NAV ARCHITECTURAL GUIDELINES.

Type Test method Technology Solution category

Recommended None C/SIDE Simple Complex Hosted

  

SUMMARY AND INTENT

This recommendation is intended to protect customer investments by ensuring maximum ISV solution compatibility with the existing Microsoft Dynamics NAV product. It is also intended to prevent future upgrade issues that result from nonstandard implementations.

RESOURCES

For more information, see the following information:

 Building a Vertical Business Success on Microsoft Dynamics NAV – White Paper – Best Practices for Business Processes and Tools (requires PartnerSource account).

 Microsoft Dynamics NAV Help Documentation in the MSDN Library.

HOW TO COMPLY

Review the Microsoft Dynamics NAV 2013 Help Documentation and the white paper. Create your design based on the principles that are described in those documents.

When you design your solution, document your solution design patterns in your design documents and specifications. If you are updating an existing solution, then perform this design for any new features that you are adding and consider if you need to do this retroactively for part of the existing solution. Conduct design reviews to ensure that your solution uses the design patterns that you documented.

9.2 THE ISV SOLUTION SHOULD FOLLOW REPORTING GUIDELINES.

Type Test method Technology Solution category

Recommended None C/SIDE Simple Complex Hosted

  

SUMMARY AND INTENT

ISV solutions should provide reporting that is consistent with the reporting functions of Microsoft Dynamics NAV.

We recommend that you use the Reporting User Experience Guidelines in the MSDN Library.

RESOURCES

See Designing, Running, and Printing Reports in the MSDN Library.

 See Upgrading Reports if you are migrating existing reports to Microsoft Dynamics NAV 2013.

HOW TO COMPLY

You should provide a list of reports as part of your submission.

Note Classic reports can be imported into Microsoft Dynamics NAV 2013 so that you can upgrade them.

You cannot run Classic reports in Microsoft Dynamics NAV 2013.

9.3 SENSITIVE DATA SHOULD BE TRANSPORTED IN AN ENCRYPTED FORM.

Type Test method Technology Solution category

Recommended None WSCalling Simple Complex Hosted

   

SUMMARY AND INTENT

If you pass sensitive application data in web service requests or response messages, then consider how you can ensure that they remain private and unaltered while in transit. One possibility is to use transport-level encryption through Secure Sockets Layer (SSL).

Web services SSL is disabled by default on Microsoft Dynamics NAV Server. If you want to use SSL, then you must activate it, and your computer must have trusted certificates.

To activate web services SSL on Microsoft Dynamics NAV Server, you must open the CustomSettings.config file and change the value of the relevant key, such as SOAPServicesSSLEnabled or ODataServicesSSLEnabled, to true.

RESOURCES

For more information, see:

 Working with Web Services

 Building Secure Web Services

HOW TO COMPLY

All sensitive data should be transported in an encrypted form.

9.4 THE ISV SOLUTION SHOULD PROPERLY HANDLE TIME ZONES, ESPECIALLY WHEN WORKING WITH MICROSOFT DYNAMICS NAV WEB SERVICES.

Type Test method Technology Solution category

Recommended None All Simple Complex Hosted

  

SUMMARY AND INTENT

Processing web service requests by C/AL code that is running on Microsoft Dynamics NAV Server is performed in Coordinated Universal Time (UTC) by default, but you can change this by modifying the

ServicesDefaultTimeZone key in the CustomSettings.config file. You should make sure that the web service client and the server either work in the same time one, or that you convert between the local time and UTC, for example. If a solution is developed in a single time zone, especially in a time zone that is the same as UTC zone, then it is possible to overlook the needed conversions, which can lock the user to one particular time zone.

When you develop Microsoft Dynamics NAV Portal Framework solutions, the time zone and locale information must be specified in SharePoint as described in Configure regional settings on Office.com. The time zone and regional settings that are specified in SharePoint should also be used by applications that are built by ISVs.

RESOURCES

For more information, see Working with Web Services in the MSDN Library.

HOW TO COMPLY

When passing DateTimes between a web service client and the server, convert times from the local client time zone to UTC. When processing results from web service calls, convert times to the local time zone if you are in a different time zone from UTC. Respect system time zone settings on the client machine

9.5 THE ISV SOLUTION SHOULD NOT PRODUCE BEST PRACTICE TOOL ERRORS.

Type Test method Technology Solution category

Recommended In-lab test C/SIDE Simple Complex Hosted

  

SUMMARY AND INTENT

ISV solutions should use the same coding standards that the Microsoft Dynamics NAV development team uses.

RESOURCES

The following documents provide information about development best practices:

 Building a Vertical Business Success on Microsoft Dynamics NAV – White Paper – Best Practices for Business Processes and Tools (requires PartnerSource account).

 Developer and IT Pro Help for Microsoft Dynamics NAV 2013 in the MSDN Library.

The following tool can be used to validate compliance with best practices:

 impuls Check Tool for Microsoft Dynamics NAV, which is available at https://www.impuls-solutions.com/Pages/1048.aspx.

Note This external tool is not part of the test and must be purchased separately.

HOW TO COMPLY

Follow the guidelines in the documents that are listed in the Resources section.

Run the impuls Check Tool on the new objects that are added or existing objects that are modified by your solution. The following error IDs should not be reported for the new objects or for entities that have been added by the ISV solution:

 1012 Number of OptionCaptions is different than number of OptionStrings.

 1015 Field names must not start with a blank.

 2001 Reference to non-existing parent control.

 3001 OnModify trigger must not contain ERROR Messages.

 3006 The procedure was cut by the export.

 3008 Name is empty.

 3009 The name of non-temporary record variables should not begin with “Temp.”

 3010 The name of temporary record variables should begin with “Temp.”

 4005 Button’s access key has conflict with the client menu.

 4006 Access Key is missing.

 4009 Separator should not have a caption.

 5001 Object names must not end with a blank.

If the solution provides multilanguage support, then the following errors should not be reported for the new objects or for modifications to existing objects:

 3004 MESSAGE, ERROR, CONFIRM, STRMENU, and SELECTSTR should contain only text constants as text.

 4001 Not all Multi-Language Captions exist.

 4002 Not all Multi-Language OptionCaptions exist.

 4003 Not all Multi-Language ToolTips exist.

 4008 Not all Multi-Language PageNames exist.

 4010 Text constant does not include all ML-languages.

 4011 Text of different Multi-Language Captions is equal.

9.6 THE COMPANY NAMES SHOULD BE PROPERLY ENCODED IN THE WEB SERVICES URLS.

Type Test method Technology Solution category

Recommended In-lab review External Simple Complex Hosted

  

SUMMARY AND INTENT

When an ISV solution is submitted for testing, it can contain client applications or systems that were developed outside Microsoft Dynamics NAV and call web services that are exposed in Microsoft Dynamics NAV.

One segment of the URL to Microsoft Dynamics NAV web services contains the name of the company in Microsoft Dynamics NAV that contains the data that is used by the web service. We recommend that this path segment is percent encoded so that it stands out as an atomic path segment.

The encoding is significant when the company name contains special characters such as “ ”, “/”, and “,”. The “/”

character can be confusing because it could be part of the company name or a path segment separator.

For example, the company name “CRONUS A/B” gets percent encoded to “CRONUS%20A%2FB”. A resulting web service URL will then look like this:

http://localhost:7047/DynamicsNAV/ws/CRONUS%20A%2FB/Codeunit/Customer

For client applications that are developed with the .NET Framework, we recommend to percent encode the company name path segment URLs with the Uri.EscapeDataString method.

RESOURCES

For more information, see:

 RFC 3986

 Uri.EscapeDataString Method

HOW TO COMPLY

Ensure that you encode the company path segment with percent encoding. Use the Uri.EscapeDataString method for client applications that are developed with the .NET Framework.

9.7 THE ISV SOLUTION SHOULD FOLLOW APPLICATION PERFORMANCE BEST PRACTICES.

Type Test method Technology Solution category

Recommended None All Simple Complex Hosted

  

SUMMARY AND INTENT

Performance issues should be considered throughout the development cycle, not at the end when the system is implemented. Many performance issues that result in significant improvements are achieved by careful design.

To most effectively optimize the performance of your application, you should use the features that are built into C/SIDE to increase performance.

RESOURCES

For more information, see Improving Application Performance in the MSDN Library.

HOW TO COMPLY

The ISV solution should use the features that are built into C/SIDE to increase performance, such as the DBMS cache, the commit cache, and the command buffer.

9.8 THE ISV SOLUTION SHOULD FOLLOW KEYBOARDING BEST PRACTICES.

Type Test method Technology Solution category

Recommended None All Simple Complex Hosted

  

SUMMARY AND INTENT

Several shortcut keys have changed in the Microsoft Dynamics NAV Windows client in Microsoft Dynamics NAV.

These shortcut keys have changed for two reasons:

 To avoid conflicts with shortcut keys in the Windows operating system.

 To align with shortcut keys in the Windows operating system.

ISV solutions should make sure that their shortcut keys do not conflict with ones in Microsoft Dynamics NAV.

RESOURCES

For more information, see:

 Keyboard Shortcuts in the MSDN Library.

HOW TO COMPLY

The ISV solution should follow the following guidelines when creating shortcut keys:

 Do not use ALT+<key> because there could be conflicts with menu mnemonics in different locales.

 Do not override any system action shortcut. For example, do not use CTRL+SHIFT+Q as a shortcut because it will conflict with expand and collapse lines in hierarchical grids.

 Read the documentation about function keys for those that are available for partners. Many function keys are reserved for system actions.

 Do not use combinations of extended characters, which are Latin characters and digits that are outside the core ASCII set, that require more than one modifier key because they are not supported. For example, CTRL+ß will work on a German keyboard, but it will not work on a Romanian keyboard.

9.9 ISV COMPONENTS RUNNING IN THE SAME WEB PAGE AS MICROSOFT DYNAMICS NAV PORTAL FRAMEWORK COMPONENTS SHOULD NOT MODIFY THE DOM STRUCTURE THAT IS RELATED TO THE MICROSOFT DYNAMICS NAV PORTAL FRAMEWORK PAGE

.Type Test method Technology Solution category

Required None NPF Simple Complex Hosted

  

SUMMARY AND INTENT

To ensure SharePoint theming support and upgradability, the DOM structure of Microsoft Dynamics NAV Portal Framework components should not be changed by the ISV solution.

RESOURCES

None

HOW TO COMPLY

Ensure that the original DOM structure of Microsoft Dynamics NAV Portal Framework pages is not changed.

9.10 MICROSOFT DYNAMICS NAV PORTAL FRAMEWORK APPLICATIONS SHOULD NOT THROW EXCEPTIONS ON THE ONOPENPAGE TRIGGER.

Type Test method Technology Solution category

Required In-lab review NPF Simple Complex Hosted

  

SUMMARY AND INTENT

When a Microsoft Dynamics NAV page is hosted in a Web Part, most exceptions are handled with a message in a dialog box. After closing the dialog box, the page is refreshed, which can potentially cause the same exception again.

RESOURCES

None

HOW TO COMPLY

Ensure that the OnOpenPage trigger does not cause any exception with page or codeunit code.

9.11 MICROSOFT DYNAMICS NAV PORTAL FRAMEWORK APPLICATIONS SHOULD PROVIDE AUTOMATED SCRIPTS OR INSTRUCTIONS FOR SHAREPOINT FARM DEPLOYMENTS.

Type Test method Technology Solution category

Required In-lab review NPF Simple Complex Hosted

  

SUMMARY AND INTENT

Microsoft Dynamics NAV Portal Framework deployment provides support for SharePoint farms. The ISV solution should follow and provide support for deploying the solution on multiple servers in a SharePoint farm. The same applies when removing the ISV solution.

RESOURCES

In document Microsoft Dynamics NAV (Page 48-54)

Related documents