<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Rashed Amini</title>
	<link>http://mibuso.com/blogs/ara3n</link>
	<description>The ara3n weblog</description>
	<pubDate>Fri, 09 Apr 2010 16:46:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Downgrade 2009 sp1 objects into 5.x or older databases</title>
		<link>http://mibuso.com/blogs/ara3n/2010/04/09/downgrade-2009-sp1-objects-into-5x-or-older-databases/</link>
		<comments>http://mibuso.com/blogs/ara3n/2010/04/09/downgrade-2009-sp1-objects-into-5x-or-older-databases/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 16:46:57 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2010/04/09/downgrade-2009-sp1-objects-into-5x-or-older-databases/</guid>
		<description><![CDATA[	Most of modification I do,  I try to reuse them in other projects.  I have built this generic integration objects that can be used in 80 % of the integration scenarios that NAV integrates with other systems.  I’ve built it in 2009 sp1 and one of our clients was running on 5.0. [...]]]></description>
			<content:encoded><![CDATA[<p>	Most of modification I do,  I try to reuse them in other projects.  I have built this generic integration objects that can be used in 80 % of the integration scenarios that NAV integrates with other systems.  I’ve built it in 2009 sp1 and one of our clients was running on 5.0.  As you probably know, loading fob from 2009 into older version is not possible.  It crashes older NAV clients.  The workaround is to export them from 2009 as text and then removing 2009 specific areas out of the text file and then importing them into 5.0 or older executables.  I’m sure many partners and VARS are in same scenarios.  They do their development on latest version of NAV and back port it to older version if required.<br />
I’ve built this tool that takes a text file and automatically removes 2009 sp1 properties and allows it to import the text file into 5.0 or older version.<br />
<img src="http://sites.google.com/site/ara3nfiles/Home/DowngradePic.png" alt="Downgrade NAV objects" /></p>
<p>I have testing this all nav standard objects by loading them from 2009 into 5.0 sp1.<br />
Remember you do not need to the tool for forms, dataports, and codeunits.  This works for tables and xmlports and reports. </p>
<p>Here is the<a href="http://sites.google.com/site/ara3nfiles/Home/DowngradeObjects.zip"> link.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2010/04/09/downgrade-2009-sp1-objects-into-5x-or-older-databases/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dynamics Add-in with WPF</title>
		<link>http://mibuso.com/blogs/ara3n/2010/01/05/dynamics-add-in-with-wpf/</link>
		<comments>http://mibuso.com/blogs/ara3n/2010/01/05/dynamics-add-in-with-wpf/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 05:55:19 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2010/01/05/dynamics-add-in-with-wpf/</guid>
		<description><![CDATA[I wrote previously about using WPF textbox for automatic spellchecking. In this blog, I will actually talk about a real WPF Visualization that I have been playing with for a while.  I didn’t want to build a visualization from scratch, so I searched for an existing WPF solution with source code that I could [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote previously about using WPF textbox for automatic spellchecking. In this blog, I will actually talk about a real WPF Visualization that I have been playing with for a while.  I didn’t want to build a visualization from scratch, so I searched for an existing WPF solution with source code that I could use for my Add-in. I found <a href="http://dynamicdatadisplay.codeplex.com/wikipage?title=Development-time%20screens&amp;referringTitle=Home">WPF Dynamic Data Display</a> built by Microsoft Research that is used for many solutions. </p>
<p>My goal was to display sales data from Dynamics NAV in an interactive map that you could zoom in and out and it would be a nice demo tool.  The data for Longitude and longitude on map would come from customer card, and the sale data would come from transactions.  I had previously blogged about how to use geo codes for address verifications; you could use that to update all the customers’ coordinates. You would need to add two new fields to the customer table.   In my example, I didn’t want to modify existing objects so I’m simply loading a CSV file with data.<br />
Here is a screenshot of how it looks in NAV.  </p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/DynMap.png" alt="Dynamics Map Screen shot" /></p>
<p>The user can interact with the map and zoom in and out of the map, change attenuation and color of the data.. I hope you’ll find this example interesting. I’ve attached the <a href="http://sites.google.com/site/ara3nfiles/Home/DynMap.zip">Visual Studio solution</a> with 4 projects inside.  MapSample is setup as starting project and it uses the DynamicsDisplay.Control to display the same information. The “DynamicsNAV WPF AddIn2”  creates the NAV Add-in WPFDynamicMap.dll file.  The solution uses 3 external DLL file in addition to the WPFDynamicMap.dll.  In order for NAV reference these DLL files, they need to be put in the  Role Tailored client folder, instead of the Add-ins folder.   If you forget to do this the page will not open up and you’ll see the error in event log.  When compiling the project, make sure example_for_visualization.csv is in C drive, you can change in the code as well.  </p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2010/01/05/dynamics-add-in-with-wpf/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dynamics NAV Addin Example Large Button</title>
		<link>http://mibuso.com/blogs/ara3n/2009/12/11/dynamics-nav-addin-example-large-button/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/12/11/dynamics-nav-addin-example-large-button/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 17:57:57 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/12/11/dynamics-nav-addin-example-large-button/</guid>
		<description><![CDATA[Here is another example on how to create custom buttons in NAV and control events when they are pressed.  In this example I’m actually using the WinForm Button controls and displaying them on a panel. When the button are pressed Nav code is triggered and you can add your own custom logic in it.
Here [...]]]></description>
			<content:encoded><![CDATA[<p>Here is another example on how to create custom buttons in NAV and control events when they are pressed.  In this example I’m actually using the WinForm Button controls and displaying them on a panel. When the button are pressed Nav code is triggered and you can add your own custom logic in it.</p>
<p>Here is a screenshot below.  As you can see, there are two button with different sizes and colors and when you press then a nav message is displayed that you pressed it.</p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/ButtonScreenshot1.png" alt="Button Screenshot Addin" /></p>
<p>The code for CreateControl is as follows</p>
<p><code><br />
       protected override Control CreateControl()<br />
        {</p>
<p>            Button button1 = new Button();<br />
            button1.Location = new System.Drawing.Point(39, 25);<br />
            button1.Name = "button1";<br />
            button1.Size = new System.Drawing.Size(75, 23);<br />
            button1.TabIndex = 0;<br />
            button1.Text = "button1";<br />
            button1.UseVisualStyleBackColor = true;<br />
            button1.Click += new System.EventHandler(button1_Click);</p>
<p>            Button button2 = new Button();<br />
            button2.Location = new System.Drawing.Point(59, 55);<br />
            button2.Name = "Largebutton2";<br />
            button2.Size = new System.Drawing.Size(175, 123);<br />
            button2.TabIndex = 0;<br />
            button2.Text = "Largebutton2";<br />
            button2.BackColor = System.Drawing.Color.Tomato;<br />
            button2.UseVisualStyleBackColor = true;<br />
            button2.Click += new System.EventHandler(button2_Click);</p>
<p>            Panel buttonpanel = new Panel();<br />
            buttonpanel.Controls.Add(button1);<br />
            buttonpanel.Controls.Add(button2);<br />
            buttonpanel.Location = new System.Drawing.Point(12, 12);<br />
            buttonpanel.Name = "outlookGroupBox1";<br />
            buttonpanel.Padding = new System.Windows.Forms.Padding(4, 22, 4, 4);<br />
            buttonpanel.Size = new System.Drawing.Size(376, 219);<br />
            buttonpanel.TabIndex = 0;<br />
            buttonpanel.Text = "Many Buttons";</p>
<p>            return buttonpanel;<br />
        }</p>
<p></code></p>
<p>Here is the <a href="http://sites.google.com/site/ara3nfiles/Home/NAVButtons.zip">Visual Studio Project Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/12/11/dynamics-nav-addin-example-large-button/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Backup/Transfering Company Specific Data through SQL for Dynamics NAV</title>
		<link>http://mibuso.com/blogs/ara3n/2009/12/08/baking-uptransfering-company-specific-data-through-sql-for-dynamics-nav/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/12/08/baking-uptransfering-company-specific-data-through-sql-for-dynamics-nav/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 13:18:12 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/12/08/baking-uptransfering-company-specific-data-through-sql-for-dynamics-nav/</guid>
		<description><![CDATA[Dynamics NAV client has a feature to backup and restore company specific. This process creates an (.fbk) file that contains just the data without indexes.  The (.fbk) file can be used to restore in another database.  For large database this is a slow process, and not feasible to do.  In addition Dynamics [...]]]></description>
			<content:encoded><![CDATA[<p>Dynamics NAV client has a feature to backup and restore company specific. This process creates an (.fbk) file that contains just the data without indexes.  The (.fbk) file can be used to restore in another database.  For large database this is a slow process, and not feasible to do.  In addition Dynamics Developer license has recently changed in that partners no longer can delete standard NAV fields or fields added by Add-ons by an ISV.   So if a client wants to remove an Add-on from its database, they won’t be able to and will be stuck with the fields in the table, unless they call the ISV to delete them for them with their license.<br />
The following solution is a method to remove these fields, but this can also be used to Backup Company specific Data through SQL.  This lowers the time required to do Company specific backups, but it also allows a faster way to transfer setup data from one company to another company.  For example, customers want to periodically refresh their test database with production data.<br />
<img src="http://sites.google.com/site/ara3nfiles/Home/Backup1.png" alt="BackupNAV" /></p>
<p>The solution consists of a processing report that generates a sql script. It only works with 5.0 sp1 and higher. This is because it doesn’t includ the SIFT tables.  I’m sure with some modification you could run it for older versions.  As shown in the picture above the user selects a file name, destination database name, and company name. Once the user clicks OK, the report generates a sql script that copies the data from source table to a destination table.  Below is a screenshot of the SQL script. </p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/Backup2.png" alt="SQLScript" /></p>
<p>The steps for the whole process of copying a specific company through sql<br />
1.	Export all object from Source Database.<br />
2.	Create a new database and import the objects from step 1.<br />
3.	Create a blank company.<br />
4.	In Source Company, run this new report.  Specify the destination Database and Company.<br />
5.	Open the sql script and execute it. (It should run without any errors)<br />
6.	Use the new company.  </p>
<p>I mentioned above that you can also use this method to remove unwanted fields from a given table.  The change that you would need to do in step 2 is not to load object with the unwanted fields and instead load new object.  Then in step 5 find the fields in scrip file and remove them from the INSERT and SELECT statement.  This way only the fields that you want to copy are transferred to the destination database. </p>
<p>I’ve included the  <a href="http://sites.google.com/site/ara3nfiles/Home/ProcessingReportObjects.fob">ProcessingReportObjects.fob</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/12/08/baking-uptransfering-company-specific-data-through-sql-for-dynamics-nav/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Automatic Spell Checker in Dynamics NAV</title>
		<link>http://mibuso.com/blogs/ara3n/2009/11/27/automatic-spell-checker-in-dynamics-nav/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/11/27/automatic-spell-checker-in-dynamics-nav/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 09:08:14 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/11/27/automatic-spell-checker-in-dynamics-nav/</guid>
		<description><![CDATA[I saw some post on mibuso about asking for a spellchecker in Dynamics NAV.  I thought it would be an interesting project to implement automatic spellchecking  in NAV.  I decided to implement it using Add-ins.  After some googling, I found that I could use MS Office Word interop classes, but as [...]]]></description>
			<content:encoded><![CDATA[<p>I saw some post on mibuso about asking for a spellchecker in Dynamics NAV.  I thought it would be an interesting project to implement automatic spellchecking  in NAV.  I decided to implement it using Add-ins.  After some googling, I found that I could use MS Office Word interop classes, but as I started implementing it, I found out that it does do real-time automatic spellchecking on a textbox.  The user would have to click on a button and then the code would spell check the textbox.  I kept searching and found out that WPF RichTextBox control has built in spell checker.  Nav addin controls are based on winform classes, and I couldn’t use WPF RichTextBoxes.  Then I saw <a href="http://blogs.msdn.com/cabeln/default.aspx">Christian&#8217;s Blog</a> with NAV templates and it included a WPF template for data visualization.  Well displaying a textbox is a visualization of data. So I built a solution using the data visualization template.  The results are better than I expected.<br />
Here is a screenshot of Item card and the description field uses my add-in and underlines misspelled descriptions.  You can right click on a word and it will suggest a list of option you can select.<br />
<img src="http://sites.google.com/site/ara3nfiles/Home/SpellCheck.png" alt="Dynamcis NAV Spellcheck" /></p>
<p>I believe many users will find this useful for data entry and be able to see their typos as they type.  I didn’t test other languages, but I’m sure WPF RichTextBox will suggest based on windows local language settings.<br />
I’ve attached <a href="http://sites.google.com/site/ara3nfiles/Home/DynamicsNAVSpellchecker.zip">Visual Studio Project with Source Code</a>.  </p>
<p>To install the add-in, you need to insert in Client Add-in table<br />
Control Add-in Name: Dynamics.NAV.SpellChecker<br />
Public Key Token:  48f3911b65e24838<br />
And put the DynamicsNAV Add-In Project.dll  in the addin folder.<br />
Design the Item Card page and change the Description ControlAddIn  property as shown in the image below</p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/SpellCheck2.png" alt="Item Card page Dynamics NAV " /></p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/11/27/automatic-spell-checker-in-dynamics-nav/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Replacing NAS with SQL Jobs and NAV Web service</title>
		<link>http://mibuso.com/blogs/ara3n/2009/11/14/replacing-nas-with-sql-jobs-and-nav-web-service/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/11/14/replacing-nas-with-sql-jobs-and-nav-web-service/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 23:00:28 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/11/14/replacing-nas-with-sql-jobs-and-nav-web-service/</guid>
		<description><![CDATA[Many companies, running Dynamics NAV, use NAS (Navision Application Server) to automate certain processes. Some companies use NAS to schedule to run many jobs at night.  Others use it for integration where NAS periodically, using timer automation, checks a folder to process certain files throughout the day.  Others use NAS to monitor message [...]]]></description>
			<content:encoded><![CDATA[<p>Many companies, running Dynamics NAV, use NAS (Navision Application Server) to automate certain processes. Some companies use NAS to schedule to run many jobs at night.  Others use it for integration where NAS periodically, using timer automation, checks a folder to process certain files throughout the day.  Others use NAS to monitor message queue, (MSMQUEUE), for integration with web or 3rd party system.<br />
The solution I will be describing here can replace NAS in the first two scenarios. Scheduling Jobs at night and periodically running on a timer. There are many advantages to using SQL Jobs with web service than NAS.  The first advantage is reliability.  SQL Jobs is more reliable and stable.  Clients already use SQL Jobs to do nightly backups, rebuild indexes, update statistic.  I’ve seen many instances where NAS stops working and had to be scheduled to be rebooted every night.  A second advantage is intuitive/Familiar Scheduling user interface.  Most SQL Administrators are familiar with sql and how to schedule jobs.  A third advantage is that you can schedule jobs for multiple companies, where as for NAS you need one instance for each company. A forth advantage is parallel scheduling.  You can schedule to run two processes that do not lock each other out at the same time.  For example you can run a report and run Adjust Cost at the same time.  A Fifth advantage is sequential scheduling with other SQL Jobs.  For example clients run at night adjust cost routine, and would like afterwards to backup the file and rebuild the indexes.  With current NAS solution you cannot schedule SQL Backup to start automatically after Adjust cost has been run and guess how long it usually takes and setup the time for nightly backups.  If a process takes longer than usual and two jobs overlap, sql kills one of the jobs.  Another advantage is notification of jobs through mail for example.<br />
This solution can also be used for integration with 3rd party systems, where the 3rd party system connects to sql directly inserts some data into a staging table and calls Navision web service through a stored procedure. Basically the solution allows you to connect to NAV web service using TSQL.  The Solution is built in SQLCLR as stored procedure.<br />
Initially I started creating a SQL CRL Project in Visual Studio and added web reference to Navision Web service. I wrote the following code </p>
<p><code><br />
NavJobScheduler.NavWebService.RunObject MyService = new NavJobScheduler.NavWebService.RunObject();<br />
MyService.UseDefaultCredentials = true ;<br />
MyService.Url = WebServiceURL;<br />
bool Success = false;<br />
Success = MyService.RunJob("Codeunit", 50000);<br />
</code><br />
But quickly found out that sql does not allow dynamic XML Serialization is not allowed in SQL Server.  You have to build the dll file outside of visual studio in command prompt using<br />
csc /t:library StoredProc.cs WebService.cs<br />
sgen /a:StoredProc.dll</p>
<p>After following the process and trying to run the stored Process in SQL Server Management Studio, I ran into another problem with web service:  authentication.  SQL Server Agent running the job do not pass the windows users to SQLCLR stored Procedure. I had to create new credentials and assign it to web Service.</p>
<p><code><br />
System.Net.CredentialCache myCredentials = new System.Net.CredentialCache();<br />
NetworkCredential netCred = new NetworkCredential("UserID", "password","domain");<br />
myCredentials.Add(new Uri(MyService.Url), "NTLM" , netCred);<br />
MyService.Credentials = myCredentials;<br />
</code></p>
<p>Notice above that I created a NTLM credentials.   I could create a Kerberos credentials,  but unfortunately it doesn’t work under SQLCLR.  I had to change the Dynamics NAV config file and enable NTLM.  In addition, since this stored proc was access an external system, I had to change the Permission Level on the Project property to External.<br />
After making all these changes, I was finally able to connect to NAV web service and execute Navision Business logic.<br />
Using web service as reference is nice but it makes it cumbersome to work with.  You have to compile your code manually and deal with two dll files.  So I decided to use lower level classes and build the xml file manually and connect to the web service.<br />
Here is the code.<br />
<code><br />
using System;<br />
using System.Net;<br />
using System.IO;<br />
using System.Xml;</p>
<p>public partial class StoredProcedures<br />
{<br />
    [Microsoft.SqlServer.Server.SqlProcedure]<br />
    public static void NavJobScheduler(string ObjectType, int ObjectID, string Login, string Password,string Domain,string WebServiceURL)<br />
    {<br />
        string Body = @"" +<br />
             "" +<br />
                         "" + ObjectType + "" +<br />
                         "" + ObjectID + "" +<br />
                     "";</p>
<p>        WebRequest request = HttpWebRequest.Create(WebServiceURL);<br />
        request.Headers.Add("SOAPAction", @"""urn:microsoft-dynamics-schemas/codeunit/RunObject:RunJob""");<br />
        request.ContentType = "application/xml; charset=utf-8";<br />
        request.ContentLength = Body.Length;<br />
        request.Method = "POST";<br />
        System.Net.CredentialCache myCredentials = new System.Net.CredentialCache();<br />
        NetworkCredential netCred = new NetworkCredential(Login, Password, Domain);<br />
        myCredentials.Add(new Uri(WebServiceURL), "NTLM", netCred);<br />
        request.Credentials = myCredentials;</p>
<p>        Stream strWrite = request.GetRequestStream();<br />
        StreamWriter sw = new StreamWriter(strWrite);<br />
        sw.Write(Body.ToString());<br />
        sw.Close();</p>
<p>        WebResponse wr = request.GetResponse();<br />
        HttpWebResponse httpRes = (HttpWebResponse)wr;<br />
        Stream s = httpRes.GetResponseStream();<br />
        StreamReader sr = new StreamReader(s);<br />
        XmlDocument xmlDoc = new XmlDocument();<br />
        xmlDoc.Load(sr);</p>
<p>        if (xmlDoc.FirstChild.FirstChild.FirstChild.FirstChild.FirstChild.Value != "SUCCESS")<br />
        {<br />
            throw new Exception("ObjectType " + ObjectType + " ObjectID " + ObjectID.ToString() + " failed with Error: "<br />
                + xmlDoc.FirstChild.FirstChild.FirstChild.FirstChild.FirstChild.Value);<br />
        }</p>
<p>    }<br />
};<br />
</code></p>
<p>Here is how it’s called from SQL Server Management Studio in TSQL.<br />
<code>EXEC NavJobScheduler 'codeunit',50010,'USERID','password','Domain','http://localhost:7047/DynamicsNAV/WS/KRONUS2009SP1/Codeunit/RunObject'</code></p>
<p>You can schedule a SQL job as shown below and create a schedule for it.<br />
<img src="http://sites.google.com/site/ara3nfiles/Home/Screen5.png" alt="SQL Job Nav Scheduler" /></p>
<p>In Dynamics NAV I’ve created a new codeunit 50000 and published it as web service.<br />
<img src="http://sites.google.com/site/ara3nfiles/Home/Screen6.png" alt="Nav CodeUnit" /></p>
<p>With the solution above many clients can now skip using NAS altogether or use this in conjunction with NAS.<br />
I’ve attached the <a href="http://sites.google.com/site/ara3nfiles/Home/NavJobScheduler.zip">Visual Studio Project with source Code</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/11/14/replacing-nas-with-sql-jobs-and-nav-web-service/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dynamics NAV 2009 Sp1 Client Add-ins</title>
		<link>http://mibuso.com/blogs/ara3n/2009/11/09/dynamics-nav-2009-sp1-client-add-ins/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/11/09/dynamics-nav-2009-sp1-client-add-ins/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 20:46:43 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/11/09/dynamics-nav-2009-sp1-client-add-ins/</guid>
		<description><![CDATA[When Service Pack 1 was released for Dynamics NAV, it introduced a new feature:  Add-ins.  I had read the walk-through and was thinking of something useful to build that would utilize the Add-ins feature. Last week a salesperson emailed me and asked me if anybody had migrated the Graphical Process Flow Chart Tool [...]]]></description>
			<content:encoded><![CDATA[<p>When Service Pack 1 was released for Dynamics NAV, it introduced a new feature:  Add-ins.  I had read the walk-through and was thinking of something useful to build that would utilize the Add-ins feature. Last week a salesperson emailed me and asked me if anybody had migrated the Graphical Process Flow Chart Tool that Microsoft had released.  Here is the <a href="https://mbs.microsoft.com/partnersource/deployment/resources/supplements/graphicalprocessflowcharttoolmicrosoftdynamicsnav.htm">URL</a>.</p>
<p>I imported the fob and loaded the objects into a 5.0 database and looked at how the demo was built. The Visio diagrams are saved as pictures and a form with Visio picture at the back and NAV buttons displayed on the form.<br />
Here is a screen shot.  The background window show the form when you run it, and the front window is the form in design form. It’s a very simple demo.<br />
<img src="http://sites.google.com/site/ara3nfiles/Home/Screen1.png" alt="Screenshot" /></p>
<p>I created a new visual studio class project following the walk-through in the following <a href="http://msdn.microsoft.com/en-us/library/dd983804.aspx">link</a>. It was useful in getting me started with building a working Add-in that rendered a text box.<br />
There are many solutions on how to render the Visio diagram in Role Tailed client.  I tried to use the Visio control but couldn’t get it to work.  I saw in the Demo VPC the Visio diagram,  and it would be nice if they blog about it.  The other solution is to save the visio as html file and render it in a browser.  For demo purposes I thought staying with bitmap solution would be sufficient, so I decided to stay with the Bitmap solution.<br />
I created a PictureBox control and display a blank image on opening of the page.  After the Page is opened, I saved the image on the RTC temp directory and send  the Image location to the add-in be loaded on the Page. My demo solution is implemented in the following steps: Display an Empty PictureBox. Load the Image from a blob field from NAV. Handle and send mouse event coordinates to NAV. Handle mouse click event and send it to NAV. Communication  from C/AL is done through modifying the SourceExp assignment which calls Value Set function. The Add-in is used 3 times to load 3 different images on same page, and user can click on any areas and specific Dynamics NAV page will load.<br />
For example; if they click on Purchaser icon, it will open The Salesperson/Purchase Card.<br />
Here is a screen shot of the results. While moving the mouse over boxes, the mouse icon changes to a hand letting the user know that it’s click-able. </p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/Screen2.png" alt="Screenshot" /></p>
<p>The handling of Coordinates and business logic are done in NAV. In My example I’ve hardcoded the locations in code, but could be moved to a setup table and made more dynamic so that you could build a variety of solutions. For example build a touch button calculator. </p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/Screen3.png" alt="Screenshot" /></p>
<p>Or display a restaurant diagram that the user can click on and open the specific table.  Or have a warehouse Image that loads the specific bin.<br />
The mouse position/ coordinates are sent to NAV, thus you can have a setup table to do specific tasks based on the coordinates. </p>
<p><img src="http://sites.google.com/site/ara3nfiles/Home/Screen4.png" alt="Screenshot" /></p>
<p>I’ve attached the <a href="http://sites.google.com/site/ara3nfiles/Home/DemoProcessFlow.zip">demo.zip</a> file that you can download and use it for demos or for future solutions.<br />
I’ve also attached the <a href="http://sites.google.com/site/ara3nfiles/Home/MyNavAddin.zip">Visual Studio Project with source code</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/11/09/dynamics-nav-2009-sp1-client-add-ins/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Inventory Valuation in Dynamics NAV</title>
		<link>http://mibuso.com/blogs/ara3n/2009/07/04/inventory-valuation-in-dynamics-nav/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/07/04/inventory-valuation-in-dynamics-nav/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 17:59:47 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/07/04/inventory-valuation-in-dynamics-nav/</guid>
		<description><![CDATA[One of the issues customers run into as their database gets bigger and bigger is that their reports take longer and longer to run.  One of those reports is the Inventory Valuation report.  I&#8217;ve always suggested customers to look at SQL reporting services to write these reports. Inventory valuation report is a little [...]]]></description>
			<content:encoded><![CDATA[<p>One of the issues customers run into as their database gets bigger and bigger is that their reports take longer and longer to run.  One of those reports is the Inventory Valuation report.  I&#8217;ve always suggested customers to look at SQL reporting services to write these reports. Inventory valuation report is a little complex, mainly because it can be run as of date.  A user can run the report today and enter a date a month ago and find out what the value of his or her inventory was at that date.
</p>
<p>Below is a screenshot of the report.
</p>
<p><img src="http://mibuso.com/blogs/ara3n/files/2009/07/070409-1801-inventoryva12.png">
	</p>
<p>I have written the sql statement to run this on sql server and use it as datasource for your sql reporting
</p>
<p>Here is a screenshot.
</p>
<p><img src="http://mibuso.com/blogs/ara3n/files/2009/07/070409-1801-inventoryva22.png">
	</p>
<p>You can use this also in NAV report using ADO to execute the query using stored proc and get the result.  I&#8217;ve implemented the above solution at a client where the original report took 40 minutes to run, and with using ADO, it took less than 5 minutes to run the report. That&#8217;s a huge performance gain.
</p>
<p>Here is a screenshot of the data running in SSRS
</p>
<p>
 </p>
<p><img src="http://mibuso.com/blogs/ara3n/files/2009/07/070409-1801-inventoryva32.png">
	</p>
<p>
 </p>
<p>I&#8217;ve attached the code sql code here  <a href='http://mibuso.com/blogs/ara3n/files/2009/07/finalinv.zip' title='Inventory Value script'>Inventory Value script</a>
</p>
<p>In 2009 NAV released a new reporting rendering using reporting services for client.  The service tier runs business logic and generates an xml file that is rendered at the client.  Obviously if you have a large database the xml file can get huge. This takes up resources and memory on the service tier. In 2009 Sp1 they have added a new feature to offload the xml file in parts as it being generated. The problem is mitigated   but really not solved.  Until NAV introduces new objects type for querying the data we will have to live with this overhead.</p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/07/04/inventory-valuation-in-dynamics-nav/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bing and Dynamics NAV</title>
		<link>http://mibuso.com/blogs/ara3n/2009/06/15/bing-and-dynamics-nav/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/06/15/bing-and-dynamics-nav/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 02:35:26 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/06/15/bing-and-dynamics-nav/</guid>
		<description><![CDATA[As some of you know MS has released new and rebranded search engine Bing.  I really like their instant video search.  The search results were pretty good.  I search for VARIABLEACTIVE, and it showed MSDN documentation and that it no longer is supported in NAV 2009.   Google displayed also Mibuso [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you know MS has released new and rebranded search engine Bing.  I really like their instant video search.  The search results were pretty good.  I search for VARIABLEACTIVE, and it showed MSDN documentation and that it no longer is supported in NAV 2009.   Google displayed also Mibuso thread that was a few days old.  Searching for VARIABLEACTIVE mibuso showed the thread but would take me to the list of threads and not to the actual thread posting.<br />
I tried to search for Dynamics and Bing automatically suggested search option.  Here is a screenshot.  Is anything wrong with the picture?  Of course there is.  There is no Dynamics NAV suggestion.<br />
<a href='http://mibuso.com/blogs/ara3n/files/2009/06/bing1.JPG' title='Bing1'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/bing1.JPG' alt='Bing1' /></a><br />
So I searched for Dynamics NAV and the results show MS website and details about NAV.<br />
<a href='http://mibuso.com/blogs/ara3n/files/2009/06/bing2.JPG' title='Bing2'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/bing2.JPG' alt='Bing2' /></a></p>
<p>Notice that related Search has Dynamics GP.  Next I tried to search for Dynamics GP and notice the Related Searches on left.  I wonder if Bing is telling us something.<br />
<a href='http://mibuso.com/blogs/ara3n/files/2009/06/bing3.JPG' title='Bing3'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/bing3.JPG' alt='Bing3' /></a></p>
<p>I&#8217;m sure a lot of research has gone into algorithms to find what the users are looking for. I am wondering if search engines use and monitor people using them.<br />
For example, if 1000 people search for same word and they all click on the 3rd link, maybe that link is more relevant than the first 2. Or if they stop searching after they click on certain link.  I&#8217;m sure this is not exact science, and companies/users could abuse it but for forums website where people are searching for solutions, this could help a lot.  I&#8217;m sure they are researching how people are using the results.  I know I do when I write programs for Nav users.  I usually watch them and see how they use what I have built, and get ideas on how to make the process for them more efficient.<br />
Overall I think Bing another option for search engines.  I use firefox as default browser, and by default it opens to blank page, but after seeing the beautiful daily pictures, I&#8217;ve change bing as my default startup page.  I suggest to try it for a week and see if you like it. </p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/06/15/bing-and-dynamics-nav/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Faxing Reports from Dynamics NAV</title>
		<link>http://mibuso.com/blogs/ara3n/2009/06/14/faxing-reports-from-dynamics-nav/</link>
		<comments>http://mibuso.com/blogs/ara3n/2009/06/14/faxing-reports-from-dynamics-nav/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 12:48:38 +0000</pubDate>
		<dc:creator>ara3n</dc:creator>
		
		<category><![CDATA[Dynamics NAV]]></category>

		<guid isPermaLink="false">http://mibuso.com/blogs/ara3n/2009/06/14/faxing-reports-from-dynamics-nav/</guid>
		<description><![CDATA[I saw some question on mibuso forum on how to fax from Navision. This blog is about how to fax from Navision. This is method uses Microsoft Fax Services.  You can use this to fax invoices etc to customers that prefer to receive Invoices by Fax. By default it is not installed and you [...]]]></description>
			<content:encoded><![CDATA[<p>I saw some question on mibuso forum on how to fax from Navision. This blog is about how to fax from Navision. This is method uses Microsoft Fax Services.  You can use this to fax invoices etc to customers that prefer to receive Invoices by Fax. By default it is not installed and you need to install it. To install Fax Services, you need to open control Panel. Click on Add remove programs and click on Add/Remove Windows Components. Then tick Fax Services and click OK.  It may ask for windows CD to install it.<br />
<a href='http://mibuso.com/blogs/ara3n/files/2009/06/fax1.JPG' title='Fax1'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/fax1.JPG' alt='Fax1' /></a></p>
<p>After it is installed, make sure fax service is running in windows services. The code is fairly simple. Here is a screenshot<br />
<a href='http://mibuso.com/blogs/ara3n/files/2009/06/fax2.JPG' title='Fax2'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/fax2.JPG' alt='Fax2' /></a></p>
<p>Notice in code that I am saving it as rtf file instead of html file.  The FaxDoc automation issues a print command on the file and the default program that is associated it with suppose to open the file print it and then close.  I found on the internet that there are issues with print html files.  So by changing the ending of the file to rtf, windows opens MS Word and prints the file. MS word is smart enough to know that it’s a html file and it renders it correctly.  If the default program that opens rtf file in your OS is different than word, you might want to try with html file and see if it works or try to save the file as PDF. In 2009 you can save it as excel on service tier so you can try to print excel as well.  I tried to change the html file type to open with Microsoft word but no luck.<br />
You can monitor the fax status in fax Console.  You can open it from Start-&gt;Program files-&gt;Accessories-&gt;Comunications-&gt;Fax-&gt;Fax Console. Here is a screenshot.<br />
<a href='http://mibuso.com/blogs/ara3n/files/2009/06/fax3.JPG' title='Fax3'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/fax3.JPG' alt='Fax3' /></a></p>
<p>Before sending fax from NAV you need to click on Tools-&gt;Configure Fax and select your modem and check enable Send.</p>
<p><a href='http://mibuso.com/blogs/ara3n/files/2009/06/fax4.JPG' title='Fax4'><img src='http://mibuso.com/blogs/ara3n/files/2009/06/fax4.JPG' alt='Fax4' /></a></p>
<p>Here is the object for this. <a href='http://mibuso.com/blogs/ara3n/files/2009/06/faxexample.zip' title='FaxExample'>FaxExample</a>  Happy faxing. </p>
]]></content:encoded>
			<wfw:commentRss>http://mibuso.com/blogs/ara3n/2009/06/14/faxing-reports-from-dynamics-nav/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
