Best Practices for Developing Solutions for Microsoft Dynamics NAV SharePoint Client
This topic describes the following best practices that you should follow when you develop solutions for Microsoft Dynamics NAV SharePoint client on the Microsoft Dynamics NAV Portal Framework.
Follow the Microsoft Dynamics NAV 2013 User Experience Guidelines
Trigger Postbacks When Using Web Part Connections
Avoid Throwing Exceptions on the OnOpenPage Trigger
Do Not Display Dialog Boxes on the OnOpenPage Trigger
Do Not Use Windows Forms-based User Interface
Do Not Modify the DOM Structure of <token xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">navnow</token> Pages
Avoid Using Full Trust Level Security on the SharePoint Application
Provide Automated Scripts or Instructions for Deployment on SharePoint Farms
Configure Microsoft Report Viewer for Displaying <token xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">navnow</token> Reports
Follow the Microsoft Dynamics NAV 2013 User Experience Guidelines
Use these guidelines when you design new features, improve existing ones, and when you update features from earlier versions. The guidelines will help you make the best choices for your users and create a user experience that is easy and enjoyable.
For more information, see Microsoft Dynamics NAV 2013 User Experience Guidelines.
Using Web Part Connections
This section provides guidelines for solutions that use Microsoft Dynamics NAV Web Part connections.
Trigger Postbacks When Using Web Part Connections
Custom Web Parts that connect to Microsoft Dynamics NAV Web Parts should send an HTTP post as soon as data is changed in the custom Web Part so that all the connected Microsoft Dynamics NAV Web Parts can react to the change.
Web Part connections are based on a pull model of connectivity, where the consumer gets data from the provider. Data exchange occurs on the server side. When exposing data through Web Part connections, you should make sure that an HTTP post back is triggered every time that the data from the provider is changed. For more information about Web Part connections, see Understanding Microsoft Dynamics NAV Web Part Connections.
Avoid Throwing Exceptions on the OnOpenPage Trigger
When a Microsoft Dynamics NAV page is hosted in a Microsoft Dynamics NAV Web Part, most exceptions are handled with a message that appears in a dialog box. After closing the dialog box, the page is refreshed and the OnOpenPage Trigger is run. If an exception is coded on the OnOpenPage trigger, then the exception will be thrown when the user closes the error message dialog box.
Do Not Display Dialog Boxes on the OnOpenPage Trigger
When a Microsoft Dynamics NAV page is hosted in a Microsoft Dynamics NAV Web Part that is connected to another Web Part, then the connection between the Web Parts is refreshed every time that a value in the provider Web Part changes. When the connection is refreshed, the OnOpenPage trigger of the Microsoft Dynamics NAV page is executed. If a dialog box is displayed on the OnOpenPage trigger, then the dialog box will display when the connection is refreshed.
Instead of displaying dialog boxes on the OnOpenPage trigger, you should use validation in C/AL code to provide information to the end user. A validation message appears locally in the Web Part that contains the Microsoft Dynamics NAV page.
Do Not Use Windows Forms-based User Interface
Microsoft Dynamics NAV SharePoint client solutions should not implement user interface elements, such as dialog boxes or other page constructs that use Windows Forms controls. The code for Microsoft Dynamics NAV SharePoint client solutions resides on the computer that is running the SharePoint Server and Microsoft Dynamics NAV Portal Framework. Running code that implements Windows Forms can result in errors and exceptions.
For more information about Windows Forms, see Windows Forms.
Do Not Modify the DOM Structure of Microsoft Dynamics NAV Pages
To make sure that SharePoint themes and upgradability are supported, custom components that are running on the same SharePoint page as a Microsoft Dynamics NAV page should not modify the Document Object Model (DOM) structure that is related to the Microsoft Dynamics NAV page.
Avoid Using Full Trust Level Security on the SharePoint Application
You configure the trust level for a SharePoint application in the application's web.config file. To make sure that a Microsoft Dynamics NAV Portal Framework solution does not reduce the security level that is employed in standard Microsoft products, you should not configure full trust level in the web.config file for the SharePoint application that is running a Microsoft Dynamics NAV Portal Framework solution.
Provide Automated Scripts or Instructions for Deployment on SharePoint Farms
Microsoft Dynamics NAV Portal Framework can be installed on one or more SharePoint farms. The Microsoft Dynamics NAV Portal Framework solution must be able to be deployed on and removed from multiple servers and computers in a SharePoint farm.
Microsoft Dynamics NAV Portal Framework does not support all SharePoint farm topologies. For a list of the supported topologies, see Deployment Scenarios.
Configure Microsoft Report Viewer for Displaying Microsoft Dynamics NAV Reports
Microsoft Dynamics NAV Portal Framework uses Microsoft Report Viewer 2010 for displaying reports. Microsoft Report Viewer requires that its ASP.NET web handler file is configured in the web.config file of the SharePoint application for the site that is running Microsoft Dynamics NAV Portal Framework.
For more information, see How to: Configure Microsoft Report Viewer for the Microsoft Dynamics NAV Web Client and SharePoint Client.
See Also
Concepts
Developing for the Microsoft Dynamics NAV SharePoint Client
Getting Started with Microsoft Dynamics NAV Portal Framework
Connecting Microsoft Dynamics NAV Web Parts to Other Web Parts
Accessibility Features of Microsoft Dynamics NAV SharePoint Client
Deploying Microsoft Dynamics NAV Portal Framework