Monday, 28 July 2014

How to Build an Online Help Page in Microsoft Dynamics NAV 2013 R2



Online help page is a web page which displays information in a web browser when user presses the key F1 for the selected field or page in MS Dynamics NAV 2013 R2.

In this blog I will try to document the process of creating online help page for Microsoft Dynamics NAV 2013 R2 version, from creating online help topic to building the complied (html) help page and also how to integrate the help page into your project.
Prerequisites:

   ·    Microsoft Dynamics NAV 2013 R2 with a developer license.

   ·    The Cronus International Ltd. Demonstration database.

   ·    Microsoft Dynamics NAV Help Builder.

   ·    Microsoft Dynamics NAV Help Server.

   ·    HTML Help Workshop.

   ·    An HTML Editor, example: - Notepad.

Following steps illustrates the process of creating and building an online help page:

1. Setting up the Help Project Folder

                  Create a folder which contains a Source subfolder. The Source subfolder contains all project system files and source files that you will need to work with. After you compile the Help project for the first time, a subfolder named Processed is automatically created next to the Source subfolder to hold the built .chm files. You will find the html folder, under the Processed subfolder, which holds all of the .html files.

The HTML files contains online help topic which is displayed in web browser when user presses the key F1 for selected field in a page.

          I.   Create a folder named HelpExample on drive C of your computer.

         II.   Navigate to the Help Toolkit installation location, and then open the Samples folder. The installation is typically located at "C:\Program Files (X86)\Microsoft Dynamics NAV 2013 Help Toolkit"

        III.   Copy the addin_a and Shared folders to C:\HelpExample, these folders contain system files which will be used by Help Toolkit to generate .chm and .html files.

2. Creating New Help Topics and Adding Them to the Help Project

                Create the topics and add them to a Help project file that will output the .html file. If you are creating many new field topics under a table, then you can save time by using the Help Generator Tool. For more information, see http://msdn.microsoft.com/en-us/library/dn414543(v=nav.71).aspx.

Create a Help topic for the new table, field and page

         I.    In the windows Explorer, open C:\HelpExample\addin_a\Source\HTML folder and select T_9.htm file and open it with Notepad.

        II.   To display number and name of the table on the title bar of a web page, find the and replace the text with the ($ T_TableNumber TableName $) where TableNumber and TableName is number and name of the table to which you are creating help topic.

       III.   To display number and name of a page on the header of a web page, find the and replace the text with ($ T_TableNumber TableName $).

                

                                           Figure 1: Shows <title>and <span> tags.

       IV.   Online Help page that displays the description of a table is added as element of the tag which is listed under the tag.



Figure 2: Shows <p> tag where you can insert a description of the kind of that the table, field or page defines.

        V.    Save all Help topics were created with an extension of .htm format.

       VI.    Repeat above steps for both page and each field in a table, just make sure that number of a table and field number of a table should be correct and should be in the bellow format.

                a.      For tables: - ($ T_TableNumber TableName $).
                b.      For fields of a table: - ($ T_TableNumber_FieldNumber FieldName $).
                c.      For pages: - ($ N_PageNumber PageName $).

      VII.     After you have created the help topic files, add them to the Help project by using HTML Help Workshop. Microsoft HTML Help Workshop (Hhw.exe) is an executable program designed to help you create help systems using source files based on Hypertext Markup Language (HTML).



                                      Figure 3: HTML Help Workshop.

3. Creating the Object String File

                After you have created the new help topics and added them to the new Help file, you can export the object names and IDs from Microsoft Dynamics NAV. These object names and IDs will be used by Help Builder to establish the Help calls.

Export objects for which you are creating Help pages. Export the objects as Multilanguage object string file. To create object string file select the Tools menu, point to Translate, and then choose Export.

After you have exported the objects and converted it into an object.xml file, you can use the object file as input to the Help Builder. For more information, see http://msdn.microsoft.com/en-us/library/dn414532(v=nav.71).aspx

4. Building the Help Files

                After you have created the new content and the object string file, which you have converted to object.xml, build the Help file by using Help Builder. If you are building translated content, then you should use the configuration settings that installed with the Help Toolkit at My Documents\Microsoft Dynamics NAV 2013 Help Toolkit\Config\Help Builder\[locale].

Start Microsoft Dynamics NAV Help Builder and step through the Help Builder Wizard. Specify the

            a.      Help project to compile: - source file that contains Help topics were created.
            b.      Configuration file to use: - you can specify the configuration file related to regional settings, if required else you can mention the default settings.
            c.       Object string file to use: - it contains objects to which you are creating Online Help pages.
            d.       Output file:- where you wish to save the output (generated Online Help pages).


                     Figure 4: Microsoft Dynamics NAV Help Builder Wizard.

5. Integrate and Verify the Help File with Core Help

                Integrate and verify the new Help with Microsoft Dynamics NAV Help

a.       In Windows Explorer, open C:\HelpExample\addin_a\Processed\html.
b.       In Windows Explorer, copy all of the generated HTML files to your equivalent of C:\inetpub\wwwroot\DynamicsNAV71Help\en.
c.       Select the field, and then press F1.

If you wish to discuss regarding this Online Help Build blog, please feel free to drop me an comment.

Regards,
Sathish

Thursday, 17 July 2014

System.Data.SqlClient.SqlError -When Restoring a Database to SQL Server 2008

Today i tried to restore a database backup to SQL Server 2008 R2 and he got the following error


Msg 3176, Level 16, State 1, Line 1 File 'D:\SQL Server 2008 DBs\test01.mdf' is claimed by 'SCTA_ORG_SECOND'(3) and 'SCTA_ORGANIZATION'(1). The WITH MOVE clause can be used to relocate one or more files.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally

let's resolve this error then we will explain the reason of this error so at the same screen used for restoring database of Microsoft SQL Server Management Studio 




select Script Action to New Query Window as the above image so you will get the following T-SQL and here we will know the reason


RESTORE DATABASE [test01] FROM  DISK = N'D:\SCTA_Org2.bak' WITH  FILE = 1,
    MOVE N'SCTA_ORGANIZATION' TO N'D:\SQL Server 2008 DBs\test01.mdf',
    MOVE N'SCTA_ORG_SECOND' TO N'D:\SQL Server 2008 DBs\test01.MDF',
    MOVE N'SCTA_ORGANIZATION_log' TO N'D:\SQL Server 2008 DBs\test01_1.ldf',
    NOUNLOAD,  STATS = 10
GO

so you will notice there are two files of mdf with the same name so just change the name of second one to test02 or to test01.ndf ( different extension) then run the command and it's successfully restored.

so the logical answer for this error first test01.mdf is a primary data file and the second is the secondary data file but the extension and name are same so that way you have to change the name or extension of second file with any other name or extension.

Note: the extension is anything ( it can be .fad or .ndf but .ndf is best practice to determine what this file for for example .ldf for log file , .ndf  for secondary data files ..).

Finally : I think the original database backup come from SQL Server 2000 and maybe this behavior allowed in SQL Server 2000 or the name is a case sensitive ( test01.mdf not like test01.MDF).

Regards,
Sathish

Microsoft Dynamics NAV 2015 will be the next major release, due later in 2014

Microsoft Dynamics NAV GM Eric Tiden speaking at WPC 2014
Microsoft Dynamics NAV GM Eric Tiden speaking at WPC 2014  

Microsoft Dynamics NAV 2015 will be the next major release of the product, and it will offer easier upgrades, better integration with Microsoft products like Office 365, and add new mobile device support.

The NAV team confirmed today at Worldwide Partner Converence 2014 (WPC), revealing the name of the release after years of using the code name "Crete".

Microsoft Dynamics NAV roadmap at WPC 2014

Dynamics NAV general manager Eric Tiden highlighted key improvements like better upgrade tools that should complete upgrades in a weekend. The team will also be building stronger Office 365 and Power BI integration into the product.

The new release will also introduce a new Dynamics NAV tablet interface for Windows, iPad, and Android. The screenshot shared with the NAV partners in attendance seemed to demonstrate a consistent app experience across devices, but the speakers said more detail would be shared at Directions.

"[NAV 2015] is not going to disrupt you," Tiden told the WPC audience. "There are no groundbreaking architectural tools. But we are giving new tools to upgrade and manage data more quickly." He pointed to a NAV 2015 TAP customer, who had successfully upgraded to the new release from NAV 2013 R2 one day.

This promise of easier upgrades was well received by the NAV partners in attendance, winning some applause. Upgrades have consistently been a pain point for NAV 2013 R2, with high costs to complete technical tasks like updating reports.  NAV 2015 will include more of the upgrade tooling that partners have been asking for to help bring down the cost.

A Microsoft Dynamics NAV 2015 home page

A brief demo of NAV 2015 showed off a role-tailored home page that included "expressive tiles". These colored squares can indicate not just standard metrics but any business information that can be derived from NAV, said NAV team member Kurt Juvyns. They also include a color coded status bar across the top of each square, with color coding logic that can be defined for each tile.

Examples of the improved look and feel of document reports in Dynamics NAV 2015

Juvyns said that browser performance is also "significanty improved" in NAV 2015.
More details are coming this fall, the team said. They'll plan to do training and brief partners on the new release at the Directions US and Europe events.

Regards,
Sathish