<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Adeptris Dynamics NAV Freelancer </title>
	<atom:link href="http://adeptrisnav.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://adeptrisnav.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 03 Jul 2009 10:57:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='adeptrisnav.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Adeptris Dynamics NAV Freelancer </title>
		<link>http://adeptrisnav.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://adeptrisnav.wordpress.com/osd.xml" title="Adeptris Dynamics NAV Freelancer " />
	<atom:link rel='hub' href='http://adeptrisnav.wordpress.com/?pushpress=hub'/>
		<item>
		<title>UK Dynamics NAV Freelance Developer</title>
		<link>http://adeptrisnav.wordpress.com/2009/07/03/uk-dynamics-nav-freelance-developer/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/07/03/uk-dynamics-nav-freelance-developer/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 10:48:11 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Freelancing]]></category>
		<category><![CDATA[Contractor]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[freelance]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/07/03/uk-dynamics-nav-freelance-developer/</guid>
		<description><![CDATA[My current Position as a Dynamics NAV Contract Developer with a Reseller in Surrey finished at the end of May 2009, after running for 6 Months. The last two contracts covered 33 months included 27 months in the City of London, this contract started out as a two month contract, for a city based medium [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=40&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My current Position as a Dynamics NAV Contract Developer with a Reseller in Surrey finished at the end of May 2009, after running for 6 Months.    <br />The last two contracts covered 33 months included 27 months in the City of London, this contract started out as a two month contract, for a city based medium sized Microsoft Gold Reseller of Dynamics, my role was as an office based Dynamics NAV developer/consultant, the reseller also had other consultants that carried out some development, with the customer base being quite diverse.</p>
<p> <span id="more-40"></span>
<p>There were several large projects and many smaller projects, one of the larger projects being for an international multi site company, that have been using Navision for day to day transactions, after a buy-out by an international company the main consolidation accounting for the group was moving to G-SAP, the requested interfaces were to be done under Sarbanes-Oxley Compliance.     <br />The SAP developers and databases were not in the UK but in Europe, the client project lead was in the US, my role was as lead developer to communicate with the different parties at a functional level and produce the Navision Interfaces and test files, turning the requirement into reality, there were many differences in what Navision could deliver and SAP could accept, and some extra changes were agreed as the project progressed, these required my in-depth understanding of Navision at a function and data level, also having an understanding the data structure required by SAP.</p>
<p>The development was carried out over three months and the system went live over the Christmas period, this meant that all Customers, Vendor, General Ledger static, historic and transactional data was exported for G-SAP, all Navision development and testing was carried out remotely from the UK, this Implementation went smoothly without any need for a roll back or any show stopping errors, and little ongoing support.</p>
<p>Another major project was a rolling project with the client driving the requirements in different phases, this project included adding new functions and features to thirteen county specific databases as well as two consolidated databases, a lot of the changes were to control the data to enable a group wide solution and central consolidation in Euro and USD Currencies.</p>
<p>My role in this project as lead developer was to communicate with the project lead and end client to how the requirements could be meet by Navision, quite often finding myself as the solution architect.</p>
<p>My main skills are in rapid development with a strong depth of knowledge of Navision at the business logic and GUI layers, working with Dynamics NAV and producing functional consistent interfaces, I have abilities to take a project through its full cycle and can offer input at all stages of a project from conception to completion.</p>
<p>I would like to hear from resellers or end users looking for contract resource to see if we can work together, short or long term, full or part-time positions, feel free to phone for an informal chat, you may also email or site mail me, the about page on my website has my current CV posted. </p>
<p>David</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=40&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/07/03/uk-dynamics-nav-freelance-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>
	</item>
		<item>
		<title>Employing a Dynamics NAV Contractor</title>
		<link>http://adeptrisnav.wordpress.com/2009/07/02/employing-a-dynamics-nav-contractor/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/07/02/employing-a-dynamics-nav-contractor/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 20:37:24 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Freelancing]]></category>
		<category><![CDATA[Agency Commission]]></category>
		<category><![CDATA[Contracting]]></category>
		<category><![CDATA[Contractor]]></category>
		<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[Freelancer]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/07/02/employing-a-dynamics-nav-contractor/</guid>
		<description><![CDATA[Working as a Dynamics NAV development freelance contractor in the UK, the contracts will almost always come through third party agencies, I have a good working relationship with a few of these, the agencies work on a commission basis for both placing permanent employees and contractors. With an employee the companies will know what commission [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=39&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Working as a Dynamics NAV development freelance contractor in the UK, the contracts will almost always come through third party agencies, I have a good working relationship with a few of these, the agencies work on a commission basis for both placing permanent employees and contractors.</p>
<p>With an employee the companies will know what commission the agency is charging as it is based on the employees salary this is usually around 15% of the annual salary, however with a contractor the company will get charged a fixed day rate and the agency will deal with paying the contractor or the contractors umbrella company.</p>
<p> <span id="more-39"></span>
<p>Having just completed two contracts totalling 33 months, the commission&#160; percentage included as part of the fixed day rate quoted today to a company looking for a contract resource, could be the difference in a company wanting to discuss a role with the contractor or not. </p>
<p>The two contracts I worked on recently had different agency commissions one was about 15% the other came out at nearly 27%, there was no difference as a contractor between the two agencies or my own day rates.</p>
<p>Companies looking for a contract resource just like the permanent roles should consider asking the agencies for the contract commission rates, this could save the company some money as there may be some movement in the commission rates. </p>
<p>As a contractor in the UK in each contract there are four elements, me as the contractor, I work through an umbrella company called giant group, giant raise a contract with the agency and deal with my payments, the agency then raise a contract with their end client, I have also worked through giant group contracted directly with a reseller and an end user.</p>
<p>In conclusion I would say to anyone wanting to employ a contractor resource, to ask the agencies for the agencies commission rates for a contractor, before asking them to fulfil a role.</p>
<p>Quite often the same role comes to me as a contractor from several agencies, some agencies are transparent and will discuss their commission with the contractor, with others I often wonder if the agencies commission could make the rate unacceptable to the client.&#160;&#160;&#160; </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=39&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/07/02/employing-a-dynamics-nav-contractor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>
	</item>
		<item>
		<title>Prepayment and Deferred Revenue Report</title>
		<link>http://adeptrisnav.wordpress.com/2009/06/30/prepayment-and-deferred-revenue-report/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/06/30/prepayment-and-deferred-revenue-report/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 13:05:38 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Freelancing]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Deffered Revenue]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[free code]]></category>
		<category><![CDATA[free tutorials]]></category>
		<category><![CDATA[Freelancer]]></category>
		<category><![CDATA[Payments]]></category>
		<category><![CDATA[Pre-Payments]]></category>
		<category><![CDATA[Prepayments]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/06/30/prepayment-and-deferred-revenue-report/</guid>
		<description><![CDATA[To follow on from: Dealing with Prepayments and Deferred Revenue&#160; Scenario The head of accounts would like a function for creating the recurring journals for the prepayments and deferred revenue, there is a link to download the report in the foot of this blog post, I would urge you to read on to understand how [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=35&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To follow on from: <a href="http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-accruals-dealing-with-prepayments-and-deferred-revenue/">Dealing with Prepayments and Deferred Revenue</a>&#160;</p>
<h5>Scenario</h5>
<p>The head of accounts would like a function for creating the recurring journals for the prepayments and deferred revenue, there is a link to download the report in the foot of this blog post, I would urge you to read on to understand how this report is designed and how it&#160; works, this report is designed as a learning aid for developers.</p>
<p>There are several points that need to be considered:</p>
<ul>
<li>To be able to select the original transaction from a list </li>
<li>Choose which account to balance to </li>
<li>A transaction may already part realized </li>
<li>A transaction may start to be realized in the future </li>
<li>Input starting and ending dates for the transaction </li>
<li>Dimensions must be carried across </li>
</ul>
<p> <span id="more-35"></span><br />
<h5>Dealing with Deferred Revenue</h5>
<p>We have two software licence invoices posted to the system this month and we want to create a journal to deal with the deferred revenue, we have already supplied services the first invoice, the is a renewal that starts at a future date</p>
<h5>The Request Form&#160;&#160; </h5>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/79168838.jpg"><img title="79168838" style="display:inline;border-width:0;" height="381" alt="79168838" src="http://adeptrisnav.files.wordpress.com/2009/06/79168838_thumb.jpg?w=454&#038;h=381" width="454" border="0" /></a> </p>
<h5>The First Invoice</h5>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/78928563.jpg"><img title="78928563" style="display:inline;border-width:0;" height="325" alt="78928563" src="http://adeptrisnav.files.wordpress.com/2009/06/78928563_thumb.jpg?w=454&#038;h=325" width="454" border="0" /></a> </p>
<p>As you can see we are already within the period covered by this Invoice, the date we are processing this invoice is still in June, so we do not want to defer any revenue that we have already provided services for, the two accounts we used for this example are:</p>
<p>6955 &#8211; Service Contract Sale to post the invoice to</p>
<p>5797 &#8211; Prepaid Software Contracts to defer the revenue&#160; </p>
<p>We run the report select a Journal Template and Journal Batch, lookup or enter account number 6955 then drill down and pick up the Invoice Entry</p>
<p>We then enter the start and end date for the service contract duration</p>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/79265337.jpg"><img title="79265337" style="display:inline;border-width:0;" height="383" alt="79265337" src="http://adeptrisnav.files.wordpress.com/2009/06/79265337_thumb.jpg?w=454&#038;h=383" width="454" border="0" /></a> You can see that the first recurring entry will be in July and the amount to process has taken into account the expired days, as the value could not be divided by 10 the report created the last Journal Entry with the 0.02 difference, we then press the button to transfer the lines to the Recurring Journal&#160;&#160; </p>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/79579138.jpg"><img title="79579138" style="display:inline;border-width:0;" height="274" alt="79579138" src="http://adeptrisnav.files.wordpress.com/2009/06/79579138_thumb.jpg?w=454&#038;h=274" width="454" border="0" /></a> </p>
<p>In this example six lines have been created, the first two reverse out the remaining amount to the deferred revenue account, this will run just the once, the next two lines are the fixed recurring values and will run for&#160; 9 months, the last two lines complete the process and deal with the final transaction.</p>
<h5>The Second Invoice</h5>
<p>This invoice has been paid to cover services that are not yet due, and will start in the middle of August so we need to defer the whole invoice and in the first and last months deal with the part month values</p>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/79083696.jpg"><img title="79083696" style="display:inline;border-width:0;" height="325" alt="79083696" src="http://adeptrisnav.files.wordpress.com/2009/06/79083696_thumb.jpg?w=454&#038;h=325" width="454" border="0" /></a> </p>
<p>As the first Invoice here is the request form</p>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/79635329.jpg"><img title="79635329" style="display:inline;border-width:0;" height="381" alt="79635329" src="http://adeptrisnav.files.wordpress.com/2009/06/79635329_thumb.jpg?w=454&#038;h=381" width="454" border="0" /></a>&#160; The first Journal entry for the part month will only cover the first 8 days, this will be followed by 11 fixed months, and a part month to complete, this will be eight lines, and as you can see all dimensions are copied from the original line.</p>
<p><a href="http://adeptrisnav.files.wordpress.com/2009/06/79774269.jpg"><img title="79774269" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="289" alt="79774269" src="http://adeptrisnav.files.wordpress.com/2009/06/79774269_thumb.jpg?w=454&#038;h=289" width="454" border="0" /></a> </p>
<p>The report can be downloaded without any need for registration from the downloads page on my website, any feedback is welcome here on this blog </p>
<p><a href="http://www.adeptris.com">www.adeptris.com</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=35&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/06/30/prepayment-and-deferred-revenue-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/79168838_thumb.jpg" medium="image">
			<media:title type="html">79168838</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/78928563_thumb.jpg" medium="image">
			<media:title type="html">78928563</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/79265337_thumb.jpg" medium="image">
			<media:title type="html">79265337</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/79579138_thumb.jpg" medium="image">
			<media:title type="html">79579138</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/79083696_thumb.jpg" medium="image">
			<media:title type="html">79083696</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/79635329_thumb.jpg" medium="image">
			<media:title type="html">79635329</media:title>
		</media:content>

		<media:content url="http://adeptrisnav.files.wordpress.com/2009/06/79774269_thumb.jpg" medium="image">
			<media:title type="html">79774269</media:title>
		</media:content>
	</item>
		<item>
		<title>Dealing with Prepayments and Deferred Revenue</title>
		<link>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-accruals-dealing-with-prepayments-and-deferred-revenue/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-accruals-dealing-with-prepayments-and-deferred-revenue/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:11:30 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Accruals]]></category>
		<category><![CDATA[Contractor]]></category>
		<category><![CDATA[Deffered Revenue]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[MS Dynamics]]></category>
		<category><![CDATA[MS Dynamics NAV]]></category>
		<category><![CDATA[Payments]]></category>
		<category><![CDATA[Pre-Payments]]></category>
		<category><![CDATA[Prepayments]]></category>
		<category><![CDATA[Spread Values]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-accruals-dealing-with-prepayments-and-deferred-revenue/</guid>
		<description><![CDATA[One of the most common search terms that brings people to my website is “Accruals Prepayments and Deferred Revenue”, and the search engine brings up many complicated answers, so I will attempt to bring an explanation in plain English for pre-payments and deferred revenue. A simple one line summary, they are just goods and services [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=13&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the most common search terms that brings people to my website is “Accruals Prepayments and Deferred Revenue”, and the search engine brings up many complicated answers, so I will attempt to bring an explanation in plain English for pre-payments and deferred revenue.</p>
<p> <span id="more-13"></span>A simple one line summary, they are just goods and services that have been paid for but not yet supplied.
</p>
<p>Lets look at a simple example that we all know, once a year we get the invoice for our car or household insurance, this will cover a period of 12 months, and we often pay this a few weeks before it starts, lets say our premium is 487.67 starts on the 15th January 2010 and we want to account for this, so we post the whole invoice value to the Insurance General Ledger Account on the 15th January 2010.</p>
<p>First thing we do is to look at the the whole value a short term asset, as we have not had the services and if we cancel we will ask for a refund, the year is 12 months, and we have 11 full months and two part months so we divide the value by 12, giving us 11 at 40.64 and one at&#160; 40.63.</p>
<p>In Dynamics NAV we could deal with this simply using a Recurring Journal with eight lines:</p>
<p>The first two lines deal with moving the whole value to a pre-payments account lets say that the premium is due on the 15th January 2010 and the invoice has been posted on this date, the first two line would take the whole 487.67 from the Insurance account and move it to the pre-payments account, the recurring type is variable, frequency ‘1M’ using the same document number and the Expiration Date would be the 16th January 2010 so it only runs once.</p>
<p>The next two lines deal with the 17 days of January and would take 22.28 from the 40.63 (40.63 / 31 * 17) and post this from the pre-payments account to the Insurance account, the recurring type is variable, frequency ‘1M’ using the same date, document number and the Expiration Date would be the 16th January 2010 so it only runs once.</p>
<p>The next two lines deal with the 11 Months of February to December and would take 40.64 and post this from the pre-payments account to the Insurance account, the recurring type is Fixed, starting date 1st February 2010, frequency ‘1M’ using the same document number and the Expiration Date would be the 2nd December 2010 so it only runs 11 times.</p>
<p>The next two lines deal with the 14 days of January 2011 and would take the remaining 18.35 and post this from the pre-payments account to the Insurance account, the recurring type is variable, starting date 1st January 2011, frequency ‘1M’ using the same document number and the Expiration Date would be the 2nd January 2011 so it only runs 1 time.</p>
<p>As for deferred revenue like support contract values received by your company for services not yet given, what we do here is to look at the the whole value as a short term liability, as we have not provided the services and if the customer were to cancel they would ask for a refund, we would follow the same process but using a deferred revenue account to hold the liability until realized.</p>
<p>At any point in the year we can set a date filter and look at pre-payment and deferred revenue values as assets or liabilities.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=13&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-accruals-dealing-with-prepayments-and-deferred-revenue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamics NAV Contracting</title>
		<link>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-contracting/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-contracting/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:09:21 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Freelancing]]></category>
		<category><![CDATA[Contracting]]></category>
		<category><![CDATA[Contractor]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[Navision]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-contracting/</guid>
		<description><![CDATA[I find myself out of contract after a run of 33 months, having always found it easy to get another position this is not yet to much of a worry, having spoken to several agents it looks like there is not much going on at the moment, some have suggested a permanent role could be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=11&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I find myself out of contract after a run of 33 months, having always found it easy to get another position this is not yet to much of a worry, having spoken to several agents it looks like there is not much going on at the moment, some have suggested a permanent role could be an option, but this is not one I would consider as I prefer working as a contractor, this is a personal choice, but many think the rewards of a contractor to be a lot higher than a permanent employee.</p>
<p> <span id="more-11"></span>
<p>An employer can expect about 220 working days from a possible 260 days from an employee, and a Contractor can expect 170 chargeable days from the 220 so lets look at the rates for a contractor:</p>
<p><a title="http://www.itjobswatch.co.uk/contracts/uk/dynamics%20nav.do" href="http://www.itjobswatch.co.uk/contracts/uk/dynamics%20nav.do">http://www.itjobswatch.co.uk/contracts/uk/dynamics%20nav.do</a></p>
<p>The current rate in GBP from ITJobsWatch is reported at 275 GBP a fall from 400 GBP for the same period last year, most companies will want to work through and Agency, this add 50 GPB – 100 GBP a day onto the contractors rate, so lets say currently 325 GPB a day for the 170 Days, and if a contractor worked the 170 days in a year on a contact that is 55,250 GBP, this to anyone working as a permanent worker seem high but you need to look at the full cost of employment.</p>
<p>Currently the rates for a Dynamics NAV Employee average at 42K GBP <a title="http://www.itjobswatch.co.uk/jobs/uk/dynamics%20nav.do" href="http://www.itjobswatch.co.uk/jobs/uk/dynamics%20nav.do">http://www.itjobswatch.co.uk/jobs/uk/dynamics%20nav.do</a></p>
<p>Looking at <a title="http://www.techscribe.co.uk/ta/cost-of-employment.htm" href="http://www.techscribe.co.uk/ta/cost-of-employment.htm">http://www.techscribe.co.uk/ta/cost-of-employment.htm</a> there is a spreadsheet on this website which is based on a 42K Salary, where the true cost is calculated at 400 GBP per day for an employee so there is not much of a bottom line cost difference. </p>
<p>Working as a contractor:</p>
<p>You do not get paid for Holiday, Sickness, Paternity Leave, Expenses etc:, there are no additional benefits, car allowance, training, pension contributions, the employers can terminate the contract by an agreed notice period without reason, so there are no claims of unfair treatment.</p>
<p>The employers get a skilled resource that can hit the ground running, which they can drop at any time if the project changes or work runs dry, which is harder if employing just employees, in all my contracts I have passed on skills and added to the team in a positive way and have not had any negative feedback about how employing me as a contractor has changed the dynamic of the existing team.&#160;&#160;&#160; </p>
<p>If you are an employer thinking about using a contractor for an existing or planned project, feel free to contact me from the About page.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=11&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-contracting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamics NAV &#8211; G/L Accounts &#8211; Year with Thirteen Periods</title>
		<link>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-gl-accounts-dynamic-fiscal-year-with-thirteen-periods/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-gl-accounts-dynamic-fiscal-year-with-thirteen-periods/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:07:17 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Contractor]]></category>
		<category><![CDATA[Date Range]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[Fiscal Year]]></category>
		<category><![CDATA[Freelancer]]></category>
		<category><![CDATA[Navision]]></category>
		<category><![CDATA[Reports]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-gl-accounts-dynamic-fiscal-year-with-thirteen-periods/</guid>
		<description><![CDATA[This Tutorial is available to download from the downloads page on my Adeptris.com website, there are two versions one for the GB localised version of Dynamics NAV and the other for the worldwide version, in the download you will find the NAV objects and the tutorial in PDF format    Scenario We have a requirement in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=10&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This Tutorial is available to download from the downloads page on my <a href="http://www.adeptris.com" target="_blank">Adeptris.com</a> website, there are two versions one for the GB localised version of Dynamics NAV and the other for the worldwide version, in the download you will find the NAV objects and the tutorial in PDF format   </p>
<p><span id="more-10"></span></p>
<h5>Scenario</h5>
<p>We have a requirement in from the Finance Director at Cronus International Ltd, they have acquired two companies as part of their growth strategy, and they will be moving the accounts information across to their MBS Dynamics NAV® database and the two new companies and all the transactions, will then go through these companies.</p>
<p>As these companies use different Fiscal year and accounting period start dates, to Cronus International Ltd, our implementation consultant has set these up ready for them in the Accounting Periods table.</p>
<p>The Finance Director is familiar with the Accounts Schedules but wants a report made from the G/L Accounts table with these options:</p>
<ol>
<li>Grouping totals by General Business Posting Group</li>
<li>Must be able to deal with the new Accounting Periods</li>
<li>Whole system year and the twelve periods printed onto a landscape view</li>
<li>Accounting year with up to thirteen periods printed onto a landscape view</li>
<li>Rounding Factors of None, 1, 1000 and 1000000</li>
<li>Budget values only</li>
<li>Amount values only</li>
<li>Amount and Budget all</li>
<li>Amount and Budget only where the budget has a value</li>
</ol>
<h5>Analysis</h5>
<ol>
<li>Grouping totals by General Business Posting Group, no real problems here the wizard will do this for us.</li>
<li>Must be able to deal with the new Accounting Periods, I have seen some code to deal with this on the Customer Statistics card form, I will look there.</li>
<li>Whole system year and the twelve periods printed onto a landscape view, This we can do from the data table</li>
<li>Whole fiscal year and the thirteen periods printed onto a landscape view, I think I can squeeze in the 16 columns, just a lot of work copying and pasting.</li>
<li>Rounding Factors of None, 1, 1000 and 1000000, the Accounts Schedules can do this I will look there for the solution.</li>
<li>Budget values only, option box on the report.</li>
<li>Amount values only, option box on the report.</li>
<li>Amount and Budget, option box report</li>
<li>Amount and Budget only where the budget has a value, flag on the report</li>
</ol>
<p>So we need to look at three things, which fields to use from the G/L Accounts table, how to get and set the date filters and how to do the output rounding.</p>
<p> </p>
<p>There are several flowfields on the G/L Accounts table lets look at some of these and how they work and choose which to use in out report.</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image001_2.gif"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="clip_image001" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image001_thumb.gif" border="0" alt="clip_image001" width="244" height="155" align="left" /></a></p>
<p>We have three Amount fields and two Budget fields in the image, there are others but we will look at these, as this flowfield structure is repeated throughout the system, in the Inventory, Jobs and Resources modules, so this could be useful to you later on.</p>
<p> </p>
<p><strong>Balance:</strong> this value is affected by the applied filters except the date filter, so if I put in a date filter of 01/01/2006..01/31/2006, this field would give the sum total value of <strong><span style="text-decoration:underline;">all</span></strong> the transactions for the G/L Account.</p>
<p><strong>Balance at date:</strong> this value is affected by the applied filters and the maximum Date Filter value, so if I put in a Date Filter of 01/01/2006..01/31/2006, this field would give the sum total value of <strong><span style="text-decoration:underline;">all</span></strong> transactions up to the 01/31/2006.</p>
<p><strong>Net Change:</strong> this value is affected by the applied filters and the maximum Date Filter value, so if I put in a Date Filter of 01/01/2006..01/31/2006, this field would give the sum total value of the <strong><span style="text-decoration:underline;">selected</span></strong> transactions from the 01/01/2006 up to and including the 01/31/2006.</p>
<p>So we need to use the Net Change and Budgeted Amount fields for our report, we will look at this in the next section.</p>
<p>How to get and set the accounting periods, I said earlier that there are standard functions to do this so let’s take a look at one of the pieces the code we need to use:</p>
<p>CurrentDate := WORKDATE;</p>
<p>DateFilterCalc.CreateAccountingPeriodFilter(CustDateFilter[1],CustDateName[1],CurrentDate,0); DateFilterCalc.CreateFiscalYearFilter(CustDateFilter[2],CustDateName[2]</p>
<p>,CurrentDate,0);</p>
<p>We have 4 variables</p>
<ol>
<li>CurrentDate, a date variable to hold the base date.</li>
<li>CustDateFilter an array of text fields</li>
<li>CustDateName an array of text fields</li>
<li>DateFilterCalc Codeunit DateFilterCalc</li>
</ol>
<p>Set the current date to the workdate</p>
<p>CurrentDate := WORKDATE;</p>
<p>Get the FiscalYear for the current date</p>
<p>DateFilterCalc.CreateFiscalYearFilter(CustDateFilter[2],</p>
<p>CustDateName[2],CurrentDate,0);</p>
<p>Get the accounting period for the current date</p>
<p>DateFilterCalc.CreateAccountingPeriodFilter(CustDateFilter[1],</p>
<p>CustDateName[1],CurrentDate,0);</p>
<p> </p>
<p>This is enough for us to work with the accounting Periods</p>
<p>Now for the Standard Calendar we need a different structure</p>
<p>We have 2 more variables</p>
<ol>
<li>PeriodFormMgt codeunit PeriodFormManagement</li>
<li>CalendarSource</li>
</ol>
<p>Setting which calendar type to use, 0=Day, 1=Week, 2=Period, 3=Quarter, 4=Year and 5=Accounting Period</p>
<p>Get the date record for the Calendar Year</p>
<p>CalendarSource=4</p>
<p>PeriodFormMgt.FindDate(&#8221;,Calendar,CalendarSource);</p>
<p>Get the date record for the Calendar Month</p>
<p> </p>
<p>CalendarSource=2</p>
<p>PeriodFormMgt.FindDate(&#8221;,Calendar,CalendarSource);</p>
<p> </p>
<p>So we can use these date structures for our report, as the company changes accounting periods or the structure, our report will still work, as Cronus International Ltd, want both views we will just drop on a Use Accounting Period flag on our report.<br />
All we have to look at now is the rounding, so let’s look at the code in the Account Schedule Management and the function FormatCellAsText</p>
<p> </p>
<p>FormatCellAsText(VAR ColumnLayout2 : Record &#8220;Column Layout&#8221;;Value : Decimal) : Text[30]</p>
<p>IF NormalFormatString = &#8221; THEN BEGIN</p>
<p>   IF NOT GLSetupRead THEN BEGIN</p>
<p>      GLSetup.GET;</p>
<p>      GLSetupRead := TRUE;</p>
<p>   END;</p>
<p>   NormalFormatString := Text014 + GLSetup.&#8221;Amount Decimal Places&#8221; + Text015;</p>
<p>END;</p>
<p> </p>
<p>WITH ColumnLayout2 DO</p>
<p>   IF Value &lt;&gt; 0 THEN</p>
<p>      CASE &#8220;Rounding Factor&#8221; OF</p>
<p>         &#8220;Rounding Factor&#8221;::None :</p>
<p>            ValueAsText := FORMAT(Value,0,NormalFormatString);</p>
<p>         &#8220;Rounding Factor&#8221;::&#8221;1&#8243; :</p>
<p>            ValueAsText := FORMAT(ROUND(Value,1));</p>
<p>         &#8220;Rounding Factor&#8221;::&#8221;1000&#8243; :</p>
<p>            ValueAsText := FORMAT(ROUND(Value/1000,0.1),0,Text016);</p>
<p>         &#8220;Rounding Factor&#8221;::&#8221;1000000&#8243; :</p>
<p>            ValueAsText := FORMAT(ROUND(Value/1000000,0.1),0,Text016);</p>
<p>      END;</p>
<p>EXIT(ValueAsText);</p>
<p> </p>
<p>If we look at what happens here, a value gets passed in as a decimal, then based on which rounding factor is selected, passed back as a formatted string, we can see that most of what we need is in this function, we could copy this function and 3 text constants over to our report later, and just modify the code to suit our own requirement, but we will write our own function in this tutorial.</p>
<p>So we now know what we need to do, where we can find examples of how to do it, we can start by just using the Wizard to give us the fields and the structure of the report.</p>
<p>As this tutorial is aimed at all levels of developers, I am going to go through the Wizard steps one by step for anyone who is not familiar with using the Wizard.</p>
<p> </p>
<p>Step 1 New report dialog choose the G/L account Table from the lookup list</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image002_2.gif"><img style="display:inline;border-width:0;" title="clip_image002" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image002_thumb.gif" border="0" alt="clip_image002" width="244" height="156" /></a></p>
<p> </p>
<p>Step 2 we only need four fields on our new dynamic report these include the two flowfields we looked at earlier, and we will be using in our report Net Change and Budgeted Amount</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image003_2.gif"><img style="display:inline;border-width:0;" title="clip_image003" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image003_thumb.gif" border="0" alt="clip_image003" width="244" height="145" /></a></p>
<p> </p>
<p>Step 3 Choose which key we want to run the report on</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image004_2.gif"><img style="display:inline;border-width:0;" title="clip_image004" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image004_thumb.gif" border="0" alt="clip_image004" width="244" height="145" /></a></p>
<p> </p>
<p>We want to group our report on the General Business Posting Group so we can total</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image005_2.gif"><img style="display:inline;border-width:0;" title="clip_image005" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image005_thumb.gif" border="0" alt="clip_image005" width="244" height="145" /></a></p>
<p> </p>
<p>We want totals for both our financial fields</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image006_2.gif"><img style="display:inline;border-width:0;" title="clip_image006" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image006_thumb.gif" border="0" alt="clip_image006" width="244" height="145" /></a></p>
<p> </p>
<p>Accept the default values</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image007_2.gif"><img style="display:inline;border-width:0;" title="clip_image007" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image007_thumb.gif" border="0" alt="clip_image007" width="244" height="145" /></a></p>
<p> </p>
<p>Save the report, we will save the report at each stage, this is a good habit to get into as there is nothing worse that loosing hours of work.</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image008_2.gif"><img style="display:inline;border-width:0;" title="clip_image008" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image008_thumb.gif" border="0" alt="clip_image008" width="244" height="103" /></a></p>
<p> </p>
<p>At this point we are not interested in the sections, we need to add some variables and code first, so to add our variables, view C/AL Globals and add the following</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image009_2.gif"><img style="display:inline;border-width:0;" title="clip_image009" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image009_thumb.gif" border="0" alt="clip_image009" width="244" height="230" /></a></p>
<p> </p>
<p>We will get to look at the variables later, but for now we need to add the array and Option values</p>
<p>Arrays:</p>
<p>DateFilter = 15</p>
<p>DateName = 15</p>
<p>ChangeAmtTxt = 15</p>
<p>BudgetAmtTxt = 15</p>
<p>ChangeAmt = 15</p>
<p>BudgetAmt = 15</p>
<p> </p>
<p>To put in the array value, select the variable DateFilter then open the properties sheet for this variable Shift+F4, repeat this for the other 5 variables</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image010_2.gif"><img style="display:inline;border-width:0;" title="clip_image010" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image010_thumb.gif" border="0" alt="clip_image010" width="244" height="191" /></a></p>
<p> </p>
<p>Option Strings</p>
<p>RoundingFactor = None,1,1000,1000000</p>
<p>WhichValue = Amount,Budget,Both</p>
<p>To put in the option string value, select the variable RoundingFactor then open the properties sheet for this variable Shift+F4</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image011_2.gif"><img style="display:inline;border-width:0;" title="clip_image011" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image011_thumb.gif" border="0" alt="clip_image011" width="244" height="201" /></a></p>
<p> </p>
<p>Save your Report</p>
<p>Now we will add two functions, for this one you could copy and change the code, from Account Schedule Management but we will hand code it</p>
<p>Press F9, Select to the Functions tab</p>
<ol>
<li>Type into the name field FormatCellAsText, now press the button Locals</li>
<li>Select the Parameters tab then add the Name = Value and DataType: Decimal.</li>
<li>Now select the variables tab and add Name = ValueAsText and DataType = Text with the Size = 30</li>
<li>Close the dialog box, and select TextConstants and add the following 3 lines</li>
<li>Text014</li>
<li>Text015 &gt;</li>
<li>Text016</li>
<li>close the dialog box and save the report</li>
</ol>
<p>Now we can add our Code</p>
<p>Press F9 to bring up the code window write the following</p>
<p> </p>
<p> </p>
<p><strong>FormatCellAsText(Value : Decimal) : Text[30] Section</strong></p>
<p>IF NormalFormatString = &#8221; THEN BEGIN</p>
<p>   IF NOT GLSetupread THEN BEGIN</p>
<p>      GLSetup.GET;</p>
<p>      GLSetupread := TRUE;</p>
<p>   END;</p>
<p>   NormalFormatString := Text014 + GLSetup.&#8221;Amount Decimal Places&#8221; + Text015;</p>
<p>END;</p>
<p> </p>
<p>IF Value &lt;&gt; 0 THEN</p>
<p>   CASE RoundingFactor OF</p>
<p>      RoundingFactor::None :</p>
<p>         ValueAsText := FORMAT(Value,0,NormalFormatString);</p>
<p>      RoundingFactor::&#8221;1&#8243; :</p>
<p>         ValueAsText := FORMAT(ROUND(Value,1));</p>
<p>      RoundingFactor::&#8221;1000&#8243; :</p>
<p>         ValueAsText := FORMAT(ROUND(Value/1000,0.1),0,Text016);</p>
<p>      RoundingFactor::&#8221;1000000&#8243; :</p>
<p>         ValueAsText := FORMAT(ROUND(Value/1000000,0.1),0,Text016);</p>
<p>   END;</p>
<p>EXIT(ValueAsText);</p>
<p> </p>
<p>Save the Report</p>
<p>So what have we got here?</p>
<p><strong>FormatCellAsText(Value : Decimal) : Text[30] Section</strong></p>
<p>Note: ValueAsText is a local variable and is empty each time</p>
<p>If the NormalFormatString string is empty I.E first call to this function then fill it</p>
<p>IF NormalFormatString = &#8221; THEN BEGIN</p>
<p>   If we haven’t already got the G/L setup record then get it</p>
<p>   IF NOT GLSetupread THEN BEGIN</p>
<p>      GLSetup.GET;</p>
<p>      GLSetupread := TRUE;</p>
<p>   END;</p>
<p> </p>
<p>   In the UK the resulting string will be</p>
<p>   NormalFormatString := Text014 + GLSetup.&#8221;Amount Decimal Places&#8221;</p>
<p>   + Text015;</p>
<p>END;</p>
<p> </p>
<p>If we have a financial value passed in, format it to a string and return the value</p>
<p>Text016 will Round to 1 decimal place E.G = 1200 with factor 1000 will return 1.2</p>
<p>IF Value &lt;&gt; 0 THEN</p>
<p>   CASE RoundingFactor OF</p>
<p>      RoundingFactor::None :</p>
<p>         ValueAsText := FORMAT(Value,0,NormalFormatString);</p>
<p>      RoundingFactor::&#8221;1&#8243; :</p>
<p>         ValueAsText := FORMAT(ROUND(Value,1));</p>
<p>      RoundingFactor::&#8221;1000&#8243; :</p>
<p>         ValueAsText := FORMAT(ROUND(Value/1000,0.1),0,Text016);</p>
<p>      RoundingFactor::&#8221;1000000&#8243; :</p>
<p>         ValueAsText := FORMAT(ROUND(Value/1000000,0.1),0,Text016);</p>
<p>   END;</p>
<p>Return the formatted string</p>
<p>EXIT(ValueAsText);</p>
<p> </p>
<p>Press F9, Select to the Functions tab</p>
<ol>
<li>Type into the name field BuildDateFilter, now press the button Locals</li>
<li>Select the Parameters tab then add the Name = Calendar, DataType: = Record and SubType = Date.</li>
<li>Select the tab return value then enter return type = text and length = 50</li>
<li>close the dialog box and save the report</li>
</ol>
<p>Now we can add our Code</p>
<p>Press F9 to bring up the code window write the following</p>
<p><strong>BuildDateFilter(Calendar : Record Date) : Text[50]</strong></p>
<p>WITH Calendar DO BEGIN</p>
<p>   IF &#8220;Period End&#8221; = 0D THEN</p>
<p>      &#8220;Period End&#8221; := 31129999D;</p>
<p>   &#8220;Period End&#8221; := NORMALDATE(&#8220;Period End&#8221;);</p>
<p>   EXIT(FORMAT(&#8220;Period Start&#8221;) + &#8216;..&#8217; + FORMAT(&#8220;Period End&#8221;));</p>
<p>END;</p>
<p> </p>
<p>What does the function do, when you pass in the Calendar record?</p>
<p><strong>BuildDateFilter(Calendar : Record Date) : Text[50]</strong></p>
<p>WITH Calendar DO BEGIN</p>
<p>   If there is no end date set the date to 12/31/9999</p>
<p>   IF &#8220;Period End&#8221; = 0D THEN</p>
<p>      &#8220;Period End&#8221; := 31129999D;</p>
<p>   Set the Period end date from a closed date to a normal date</p>
<p>   &#8220;Period End&#8221; := NORMALDATE(&#8220;Period End&#8221;);</p>
<p>   Create a filter string IE: 01/01/2006..01/31/2006 and return the value</p>
<p>   EXIT(FORMAT(&#8220;Period Start&#8221;) + &#8216;..&#8217; + FORMAT(&#8220;Period End&#8221;));</p>
<p>END; ends the with statement</p>
<p> </p>
<p>Now we will add the code, to the report, select a blank data item line and press F9 to view the C/AL code</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image012_2.gif"><img style="display:inline;border-width:0;" title="clip_image012" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image012_thumb.gif" border="0" alt="clip_image012" width="244" height="162" /></a></p>
<p> </p>
<p>Now add the following code</p>
<p>IF &#8220;G/L Account&#8221;.GETFILTER(&#8220;Date Filter&#8221;) &lt;&gt; &#8221; THEN</p>
<p>   CurrDate:= &#8220;G/L Account&#8221;.GETRANGEMAX(&#8220;Date Filter&#8221;)</p>
<p>ELSE</p>
<p>   CurrDate := WORKDATE;</p>
<p>GLFilters := &#8220;G/L Account&#8221;.GETFILTERS;</p>
<p>IF UseAccPeriods THEN BEGIN</p>
<p>   DateFilterCalc.CreateFiscalYearFilter(DateFilter[14],DateName[14],CurrDate,0);</p>
<p>   EVALUATE(Calendar.&#8221;Period Start&#8221;,COPYSTR(DateFilter[14],1,8));</p>
<p>   EVALUATE(CurrDate,COPYSTR(DateFilter[14],11));</p>
<p>   CalendarSource := 5;</p>
<p>END ELSE BEGIN</p>
<p>   Calendar.&#8221;Period Start&#8221; := CurrDate;</p>
<p>   CalendarSource := 4;</p>
<p>   PeriodFormMgt.FindDate(&#8221;,Calendar,CalendarSource);</p>
<p>   DateFilter[14] := BuildDateFilter(Calendar);</p>
<p>   DateName[14] := Calendar.&#8221;Period Name&#8221;;</p>
<p>   CurrDate := NORMALDATE(Calendar.&#8221;Period End&#8221;);</p>
<p>   CalendarSource := 2;</p>
<p>END;</p>
<p> </p>
<p>PeriodFormMgt.FindDate(&#8221;,Calendar,CalendarSource);</p>
<p>DateName[1] := Calendar.&#8221;Period Name&#8221;;</p>
<p>DateFilter[1] := BuildDateFilter(Calendar);</p>
<p>MaxColumnNo := 1;</p>
<p>FOR i := 2 TO 13 DO BEGIN</p>
<p>   IF PeriodFormMgt.NextDate(1,Calendar,CalendarSource) &lt;&gt; 0 THEN</p>
<p>      IF NORMALDATE(Calendar.&#8221;Period End&#8221;) &lt;= CurrDate THEN BEGIN</p>
<p>         MaxColumnNo := MaxColumnNo + 1;</p>
<p>         DateName[i] := Calendar.&#8221;Period Name&#8221;;</p>
<p>         DateFilter[i] := BuildDateFilter(Calendar);</p>
<p>      END;</p>
<p>END;</p>
<p> </p>
<p>What are we doing here?</p>
<p>Make sure we have a date to work with if a filter was input use that else use workdate</p>
<p>IF &#8220;G/L Account&#8221;.GETFILTER(&#8220;Date Filter&#8221;) &lt;&gt; &#8221; THEN</p>
<p>   CurrDate:= &#8220;G/L Account&#8221;.GETRANGEMAX(&#8220;Date Filter&#8221;)</p>
<p>ELSE</p>
<p>   CurrDate := WORKDATE;</p>
<p> </p>
<p>Copy all the filters the user may have entered</p>
<p>GLFilters := &#8220;G/L Account&#8221;.GETFILTERS;</p>
<p> </p>
<p>If the user elected to use accounting periods then we action this code</p>
<p>IF UseAccPeriods THEN BEGIN</p>
<p>   Use the function to return our last column filter and name</p>
<p>   DateFilterCalc.CreateFiscalYearFilter(DateFilter[14],DateName[14],CurrDate,0);</p>
<p> </p>
<p>   We now have a date filter to cover the fiscal year IE 01/01/06..12/31/06</p>
<p>   Now we chop the date filter and cast the values into 2 date variables</p>
<p>   Period Start 1 to 8 = 01/01/06 and CurrDate from string position 11 = 12/31/06</p>
<p>   EVALUATE(Calendar.&#8221;Period Start&#8221;,COPYSTR(DateFilter[14],1,8));</p>
<p>   EVALUATE(CurrDate,COPYSTR(DateFilter[14],11));</p>
<p> </p>
<p>   Set the calendar Source to Accounting Period</p>
<p>   CalendarSource := 5;</p>
<p>END ELSE BEGIN</p>
<p>   This code is run for the system year</p>
<p>   Set the Period start with the CurrDate</p>
<p>   Calendar.&#8221;Period Start&#8221; := CurrDate;</p>
<p>   Set the Calendar Source to Year</p>
<p>   CalendarSource := 4;</p>
<p>   Find the relevant year</p>
<p>   PeriodFormMgt.FindDate(&#8221;,Calendar,CalendarSource);</p>
<p>   Use our function to make our Date filter</p>
<p>   DateFilter[14] := BuildDateFilter(Calendar);</p>
<p>   Return the period name IE 2006</p>
<p>   DateName[14] := Calendar.&#8221;Period Name&#8221;;</p>
<p>   Set this to the last day of the year so we can use it later</p>
<p>   CurrDate := NORMALDATE(Calendar.&#8221;Period End&#8221;);</p>
<p>   Set our source to Month</p>
<p>   CalendarSource := 2;</p>
<p>END;</p>
<p> </p>
<p>Now we have a calendar source of Month or Accounting period based on the Use Accounting Periods flag, find the first period within the Year</p>
<p>PeriodFormMgt.FindDate(&#8221;,Calendar,CalendarSource);</p>
<p>DateName[1] := Calendar.&#8221;Period Name&#8221;;</p>
<p>DateFilter[1] := BuildDateFilter(Calendar);</p>
<p>Now we loop and fill in our Date filter and date name for the other periods</p>
<p>MaxColumnNo := 1;</p>
<p>FOR i := 2 TO 13 DO BEGIN</p>
<p>   If a record is returned then action the code</p>
<p>   IF PeriodFormMgt.NextDate(1,Calendar,CalendarSource) &lt;&gt; 0 THEN</p>
<p>      Check to see if the period end date is in range</p>
<p>      IF NORMALDATE(Calendar.&#8221;Period End&#8221;) &lt;= CurrDate THEN BEGIN</p>
<p>         MaxColumnNo := MaxColumnNo + 1;</p>
<p>         DateName[i] := Calendar.&#8221;Period Name&#8221;;</p>
<p>         DateFilter[i] := BuildDateFilter(Calendar);</p>
<p>      END;</p>
<p>END;</p>
<p> </p>
<p>Next we will add our code to the “G/L Account” in dataitem view select the line and press F9 to view the C/al code</p>
<p>Now add this code</p>
<p><strong>G/L Account &#8211; OnPreDataItem() Section</strong></p>
<p>LastFieldNo := FIELDNO(&#8220;Gen. Bus. Posting Group&#8221;);</p>
<p>SETRANGE(&#8220;Date Filter&#8221;);</p>
<p>CurrReport.CREATETOTALS(ChangeAmt,BudgetAmt);</p>
<p> </p>
<p><strong>G/L Account &#8211; OnAfterGetRecord() Section</strong></p>
<p>CLEAR(ChangeAmt);</p>
<p>CLEAR(BudgetAmt);</p>
<p>HasValue := FALSE;</p>
<p>FOR i := 1 TO MaxColumnNo DO BEGIN</p>
<p>   SETRANGE(&#8220;Date Filter&#8221;);</p>
<p>   SETFILTER(&#8220;Date Filter&#8221;,DateFilter[i]);</p>
<p>   CALCFIELDS(&#8220;Net Change&#8221;,&#8221;Budgeted Amount&#8221;);</p>
<p>   ChangeAmt[i]:= &#8220;Net Change&#8221;;</p>
<p>   BudgetAmt[i]:= &#8220;Budgeted Amount&#8221;;</p>
<p>   IF NOT HasValue AND NOT ShowOnlyIfBudget THEN BEGIN</p>
<p>      IF WhichValue IN[WhichValue::Amount,WhichValue::Both] THEN</p>
<p>         HasValue:= ChangeAmt[i] &lt;&gt; 0;</p>
<p>   END;</p>
<p>   IF NOT HasValue THEN BEGIN</p>
<p>      IF WhichValue IN[WhichValue::Budget,WhichValue::Both] THEN</p>
<p>          HasValue:= BudgetAmt[i] &lt;&gt; 0;</p>
<p>   END;</p>
<p>END;</p>
<p> </p>
<p>IF NOT HasValue THEN</p>
<p>   CurrReport.SKIP;</p>
<p> </p>
<p>SETRANGE(&#8220;Date Filter&#8221;);</p>
<p>SETFILTER(&#8220;Date Filter&#8221;,DateFilter[14]);</p>
<p>CALCFIELDS(&#8220;Net Change&#8221;,&#8221;Budgeted Amount&#8221;);</p>
<p>ChangeAmt[14]:= &#8220;Net Change&#8221;;</p>
<p>BudgetAmt[14]:= &#8220;Budgeted Amount&#8221;;</p>
<p>FOR i := 1 TO 14 DO BEGIN</p>
<p>   IF ChangeAmt[i] &lt;&gt; 0 THEN</p>
<p>      ChangeAmtTxt[i] := FormatCellAsText(ChangeAmt[i]);</p>
<p>   IF BudgetAmt[i] &lt;&gt; 0 THEN</p>
<p>      BudgetAmtTxt[i] := FormatCellAsText(BudgetAmt[i]);</p>
<p>END;</p>
<p> </p>
<p>What’s it all doing?</p>
<p><strong>G/L Account &#8211; OnPreDataItem() Section</strong></p>
<p>Navision’s wizard wrote this line</p>
<p>LastFieldNo := FIELDNO(&#8220;Gen. Bus. Posting Group&#8221;);</p>
<p> </p>
<p>Clear the date filter</p>
<p>SETRANGE(&#8220;Date Filter&#8221;);</p>
<p> </p>
<p>Tell Navision we want group totals for our financial fields</p>
<p>CurrReport.CREATETOTALS(ChangeAmt,BudgetAmt);</p>
<p><strong>G/L Account &#8211; OnAfterGetRecord() Section</strong></p>
<p> </p>
<p>Clear our variables</p>
<p>CLEAR(ChangeAmt);</p>
<p>CLEAR(BudgetAmt);</p>
<p>HasValue := FALSE;</p>
<p> </p>
<p>Fill our Financial Array with the filtered values</p>
<p>FOR i := 1 TO MaxColumnNo DO BEGIN</p>
<p>   SETRANGE(&#8220;Date Filter&#8221;);</p>
<p>   SETFILTER(&#8220;Date Filter&#8221;,DateFilter[i]);</p>
<p>   CALCFIELDS(&#8220;Net Change&#8221;,&#8221;Budgeted Amount&#8221;);</p>
<p>   ChangeAmt[i]:= &#8220;Net Change&#8221;;</p>
<p>   BudgetAmt[i]:= &#8220;Budgeted Amount&#8221;;</p>
<p> </p>
<p>   Now we want to set our flag based on our selections of Amount or Both</p>
<p>   IF NOT HasValue AND NOT ShowOnlyIfBudget THEN BEGIN</p>
<p>      IF WhichValue IN[WhichValue::Amount,WhichValue::Both] THEN</p>
<p>          HasValue:= ChangeAmt[i] &lt;&gt; 0;</p>
<p>   END;</p>
<p> </p>
<p>   Now we want to set our flag based on our selections of Budget or Both</p>
<p>   IF NOT HasValue THEN BEGIN</p>
<p>      IF WhichValue IN[WhichValue::Budget,WhichValue::Both] THEN</p>
<p>         HasValue:= BudgetAmt[i] &lt;&gt; 0;</p>
<p>      END;</p>
<p>END;</p>
<p> </p>
<p>If our array variable is empty move on to the next record </p>
<p>IF NOT HasValue THEN</p>
<p>   CurrReport.SKIP;</p>
<p> </p>
<p>Add our fiscal year values</p>
<p>SETRANGE(&#8220;Date Filter&#8221;);</p>
<p>SETFILTER(&#8220;Date Filter&#8221;,DateFilter[14]);</p>
<p>CALCFIELDS(&#8220;Net Change&#8221;,&#8221;Budgeted Amount&#8221;);</p>
<p>ChangeAmt[14]:= &#8220;Net Change&#8221;;</p>
<p>BudgetAmt[14]:= &#8220;Budgeted Amount&#8221;;</p>
<p> </p>
<p>Convert our Values to Text</p>
<p>FOR i := 1 TO 14 DO BEGIN</p>
<p>   IF ChangeAmt[i] &lt;&gt; 0 THEN</p>
<p>      ChangeAmtTxt[i] := FormatCellAsText(ChangeAmt[i]);</p>
<p>   IF BudgetAmt[i] &lt;&gt; 0 THEN</p>
<p>      BudgetAmtTxt[i] := FormatCellAsText(BudgetAmt[i]);</p>
<p>END;</p>
<p> </p>
<p>So now we can look at our wizard sections.</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image014_2.jpg"><img style="display:inline;border-width:0;" title="clip_image014" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image014_thumb.jpg" border="0" alt="clip_image014" width="244" height="147" /></a></p>
<p> </p>
<p>Delete and change the section width to 262 and delete the following sections</p>
<p>G/L Account.GroupHeader (3)</p>
<p>G/L Account.Groupheader (5)</p>
<p>G/L Account.GroupFooter(7)</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image016_2.jpg"><img style="display:inline;border-width:0;" title="clip_image016" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image016_thumb.jpg" border="0" alt="clip_image016" width="244" height="82" /></a></p>
<p> </p>
<p>Now we will set some properties for our text boxes</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image017_2.gif"><img style="display:inline;border-width:0;" title="clip_image017" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image017_thumb.gif" border="0" alt="clip_image017" width="219" height="244" /></a></p>
<p> </p>
<p>G/L Account, Body (4) Field “Net Change” SourceExpr = ChangeAmtTxt[1]</p>
<p>G/L Account, Body (4) Field “Net Change” Width = 1350</p>
<p>G/L Account, Body (4) Field “Budgeted Amount” SourceExpr = BudgetAmtTxt[1]</p>
<p>G/L Account, Body (4) Field “Budgeted Amount” Width = 1350</p>
<p>G/L Account, GroupFooter (5) Field “Net Change” SourceExpr = ChangeAmtTxt[1]</p>
<p>G/L Account, GroupFooter (5) Field “Net Change” Width = 1350</p>
<p>G/L Account, GroupFooter (5) Field “Net Change” FontBold = Yes</p>
<p>G/L Account, GroupFooter (5) Field “Budgeted Amount” SourceExpr = BudgetAmtTxt[1]</p>
<p>G/L Account, GroupFooter (5) Field “Budgeted Amount” Width = 1350</p>
<p>G/L Account, GroupFooter (5) Field “Budgeted Amount” FontBold = Yes</p>
<p> </p>
<p>Next we need to add a field for the Dynamic Headings</p>
<p>View tool box and drop a text box into the G/L Account header 2 Section</p>
<p>Delete the old labels Net Change and Budgeted amount</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image018_2.gif"><img style="display:inline;border-width:0;" title="clip_image018" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image018_thumb.gif" border="0" alt="clip_image018" width="244" height="121" /></a></p>
<p>Properties</p>
<p>SourceExpr = DateName[1]</p>
<p>Width = 1350</p>
<p>FontBold = Yes</p>
<p>VertAlign = Bottom</p>
<p>Now for the boring bit we have to copy each field and paste it back in 13 times, then go to properties and change the index value to match the Column</p>
<p> </p>
<p>As in this example DateName[3] being the third column index</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image020_2.jpg"><img style="display:inline;border-width:0;" title="clip_image020" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image020_thumb.jpg" border="0" alt="clip_image020" width="244" height="106" /></a></p>
<p> </p>
<p>So we now have 14 column headings, save the report</p>
<p>Select the G/L Account, Body (5) section bar press F3 and you should get the a dialog box like this, make sure that the</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image021_2.gif"><img style="display:inline;border-width:0;" title="clip_image021" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image021_thumb.gif" border="0" alt="clip_image021" width="244" height="242" /></a></p>
<p> </p>
<p>The Options selected should be Body and After Current Section, press ok and repeat these steps, so we have 3 body sections on our report.</p>
<p>Now do the same to our first GroupFooter section adding a new GroupFooter, after current Section, we should now have 3 footer sections</p>
<p>Now do the same to our first Header section adding a new Header, after current Section, we should now have 2 Header sections</p>
<p>Select the body (5) section and BudgetAmtTxt[1] field, and drop it in the 1<sup>st</sup> new Body (6) section, now do the same with the GroupFooter BudgetAmtTxt[1] field, move it into the second group footer (9) section.</p>
<p>Now for the boring bit we have to copy each field and paste it back in 13 times, then go to properties and change the index value to match the Columns, in all for sections.</p>
<p> </p>
<p><strong>Save after changing each row, if you click off the sections, you may loose work</strong></p>
<p>So at the end you will have:</p>
<p>First Body (5) Section fields = ChangeAmtTxt[1] to ChangeAmtTxt[14]</p>
<p>Second Body (6) Section fields = BudgetAmtTxt[1] to BudgetAmtTxt[14]</p>
<p>First Group Footer (8) Section fields = ChangeAmtTxt[1] to ChangeAmtTxt[14]</p>
<p>Second Group Footer (9) Section fields = BudgetAmtTxt[1] to BudgetAmtTxt[14]</p>
<p>Rows 3 of the Body and 3 of the Group Footer need to be filled in now expand the row and select copy and and paste in the rows from above, so section body section 3 has a row for Amount and a row for budget.</p>
<p>To do this select body (5) then Ctrl+A this selects all the objects in that section, Ctrl+C to copy, select Body (7) and Ctrl+V to paste then in, do the same with the budget section, and place then in section 7 below the amount fields</p>
<p> </p>
<p>Your report sections should now look like this, if not adjust them to match, we will be changing the labels next</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image023_2.jpg"><img style="display:inline;border-width:0;" title="clip_image023" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image023_thumb.jpg" border="0" alt="clip_image023" width="244" height="183" /></a></p>
<p> </p>
<p>Now add some text boxes to the header 2 section</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image024_2.gif"><img style="display:inline;border-width:0;" title="clip_image024" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image024_thumb.gif" border="0" alt="clip_image024" width="244" height="121" /></a></p>
<p>As you can see the SourceExpr value for all the boxes are visible, and I will let you add them from viewing the image above, you do not put in the =&lt; or &gt;, so the first box you just type in ‘For the Fiscal year: ‘+DateFilter[14], save the report</p>
<p>Now we have to give our Customer some options View and Request form</p>
<p>Add the controls as in the image and set the sourceexpr as in the image.</p>
<p>The first check box SourceExp value is set to our flag ShowOnlyIfBudget.</p>
<p>The second check box SourceExp value is set to our flag UseAccPeriods.</p>
<p> </p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image025_2.gif"><img style="display:inline;border-width:0;" title="clip_image025" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image025_thumb.gif" border="0" alt="clip_image025" width="244" height="133" /></a></p>
<p>Save the report nearly there just a bit more coding for you to do, this is to switch our sections on and off, look at the images for each section and add the code.</p>
<p> </p>
<p>Start with Header (2) select the section and view code F9, show only on Page 1</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image027_2.jpg"><img style="display:inline;border-width:0;" title="clip_image027" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image027_thumb.jpg" border="0" alt="clip_image027" width="244" height="80" /></a></p>
<p> </p>
<p>Body 5 only show if which value Amount was selected on the request form</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image029_2.jpg"><img style="display:inline;border-width:0;" title="clip_image029" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image029_thumb.jpg" border="0" alt="clip_image029" width="244" height="44" /></a></p>
<p> </p>
<p>Body 6 only show if which value Budget was selected on the request form</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image031_2.jpg"><img style="display:inline;border-width:0;" title="clip_image031" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image031_thumb.jpg" border="0" alt="clip_image031" width="244" height="44" /></a></p>
<p> </p>
<p>Body 7 only show if which value Both was selected on the request form</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image033_2.jpg"><img style="display:inline;border-width:0;" title="clip_image033" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image033_thumb.jpg" border="0" alt="clip_image033" width="244" height="44" /></a></p>
<p> </p>
<p>Group Footer 8, shows if Amount was selected, in the group footer we need to load the group values into the ChangeAmtTxt variables, only if they have a value</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image035_2.jpg"><img style="display:inline;border-width:0;" title="clip_image035" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image035_thumb.jpg" border="0" alt="clip_image035" width="244" height="95" /></a></p>
<p> </p>
<p>Group Footer 9, shows only if the budget was selected, in the group footer we need to load the group values into the BudgetAmtTxt variables, only if they have a value</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image037_2.jpg"><img style="display:inline;border-width:0;" title="clip_image037" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image037_thumb.jpg" border="0" alt="clip_image037" width="244" height="95" /></a></p>
<p> </p>
<p>Group Footer 10, shows only if the both was selected, in the group footer we need to load the group values into the ChangeAmtTxt and the BudgetAmtTxt variables, only if they have a value</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image039_2.jpg"><img style="display:inline;border-width:0;" title="clip_image039" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image039_thumb.jpg" border="0" alt="clip_image039" width="244" height="108" /></a></p>
<p>All you have to do now is run the report.</p>
<h3>DOCUMENT COPYRIGHT</h3>
<p>The authors that contributed to this Adeptris.com tutorial are delighted to share their work with others.<br />
Please recognize the hard work and integrity of our contributing authors by giving them appropriate credit and citing references on any material that you share with others.<br />
Permission is granted to reproduce this material in whole or in part for educational purposes only (not-for-profit beyond cost of reproduction) provided that the authors receive acknowledgement and this notice is included:</p>
<p>Any additions or changes to these materials must be pre-approved by the author.<br />
NOTE: On most Adeptris.com documents Author Access information is placed at the bottom of the document</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=10&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/06/24/dynamics-nav-gl-accounts-dynamic-fiscal-year-with-thirteen-periods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image001_thumb.gif" medium="image">
			<media:title type="html">clip_image001</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image002_thumb.gif" medium="image">
			<media:title type="html">clip_image002</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image003_thumb.gif" medium="image">
			<media:title type="html">clip_image003</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image004_thumb.gif" medium="image">
			<media:title type="html">clip_image004</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image005_thumb.gif" medium="image">
			<media:title type="html">clip_image005</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image006_thumb.gif" medium="image">
			<media:title type="html">clip_image006</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image007_thumb.gif" medium="image">
			<media:title type="html">clip_image007</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image008_thumb.gif" medium="image">
			<media:title type="html">clip_image008</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image009_thumb.gif" medium="image">
			<media:title type="html">clip_image009</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image010_thumb.gif" medium="image">
			<media:title type="html">clip_image010</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image011_thumb.gif" medium="image">
			<media:title type="html">clip_image011</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image012_thumb.gif" medium="image">
			<media:title type="html">clip_image012</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image014_thumb.jpg" medium="image">
			<media:title type="html">clip_image014</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image016_thumb.jpg" medium="image">
			<media:title type="html">clip_image016</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image017_thumb.gif" medium="image">
			<media:title type="html">clip_image017</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image018_thumb.gif" medium="image">
			<media:title type="html">clip_image018</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image020_thumb.jpg" medium="image">
			<media:title type="html">clip_image020</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image021_thumb.gif" medium="image">
			<media:title type="html">clip_image021</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image023_thumb.jpg" medium="image">
			<media:title type="html">clip_image023</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image024_thumb.gif" medium="image">
			<media:title type="html">clip_image024</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image025_thumb.gif" medium="image">
			<media:title type="html">clip_image025</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image027_thumb.jpg" medium="image">
			<media:title type="html">clip_image027</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image029_thumb.jpg" medium="image">
			<media:title type="html">clip_image029</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image031_thumb.jpg" medium="image">
			<media:title type="html">clip_image031</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image033_thumb.jpg" medium="image">
			<media:title type="html">clip_image033</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image035_thumb.jpg" medium="image">
			<media:title type="html">clip_image035</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image037_thumb.jpg" medium="image">
			<media:title type="html">clip_image037</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/DynamicsNAVGLAccountsDynamicFiscalYearwi_73CD/clip_image039_thumb.jpg" medium="image">
			<media:title type="html">clip_image039</media:title>
		</media:content>
	</item>
		<item>
		<title>AFD postcode&#174; integration for MBS Dynamics NAV&#174;</title>
		<link>http://adeptrisnav.wordpress.com/2009/06/24/afd-postcode-integration-for-mbs-dynamics-nav/</link>
		<comments>http://adeptrisnav.wordpress.com/2009/06/24/afd-postcode-integration-for-mbs-dynamics-nav/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:52:19 +0000</pubDate>
		<dc:creator>David Cox</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Contracting]]></category>
		<category><![CDATA[Contractor]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[Dynamics NAV]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[Freelancing]]></category>
		<category><![CDATA[Navision]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://adeptrisnav.wordpress.com/2009/06/24/afd-postcode-integration-for-mbs-dynamics-nav/</guid>
		<description><![CDATA[This Tutorial is available to download from the downloads page on my Adeptris.com website, there are two versions one for the GB localised version of Dynamics NAV and the other for the worldwide version, in the download you will find the NAV objects and the tutorial in PDF format&#160;&#160; Scenario We have a requirement in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=7&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This Tutorial is available to download from the downloads page on my <a href="http://www.adeptris.com" target="_blank">Adeptris.com</a> website, there are two versions one for the GB localised version of Dynamics NAV and the other for the worldwide version, in the download you will find the NAV objects and the tutorial in PDF format&#160;&#160; </p>
<p> <span id="more-7"></span><br />
<h5>Scenario</h5>
<p>We have a requirement in from the Finance Director at Cronus UK, the sales team have been inputting some post codes wrongly, which has caused the company some embarrassment, after the recent upgrade from Navision version 3.70 to Dynamics, further development of the system, must have the least impact on the upgrade path, so there must be no heavy development, there are however a few objects spare in the Customers number range we may use these, any integration must be done within Dynamics, the use of external resources to create wrapper’s will not be allowed, it has been hard to maintain control of the required custom objects, as new equipment has been purchased, and new software installed, we have been tasked with finding a solution, there is only a small budget so the package should be basic, enter the postcode, and return the street, city, county, we do not need to be able to look up organisations or verify exact door numbers, the sales staff will enter these, we have decided to use AFD Postcode® to fulfil the requirement and have installed the sample software which will give us enough to test our modifications.</p>
<h5>Analysis</h5>
<p>There are quite a few places where we might want to have a post code lookup, Customer, Vendor, Ship to Address, Banks, and we can’t do any heavy modifications because of the cost of upgrades, the best option for us is to have the code at the form level, a little icon like we use for telephone and email, this means that we do not have to touch the C/AL Code on the post code fields.</p>
<p>We will need a table to act as a buffer, there can be many properties with the same post code, we will need to show these, so the sales staff can choose, how can we find out if the user has the software on their PC, we cannot add a field to the user “AFD User”, as often the users change desks, so it will need to be at the workstation level, where we need to check, so we will install the software on each PC at the default location, we can look to see if the dll exists, this is crude but it will should work for us.</p>
<p>We also need to think about what variances there may be, corporate and personal, then the various address types, like “the old mill”, “flat B”, “Central Tower” etc.</p>
<p>So we will allow up to four input fields to construct the address.</p>
<ol>
<li>Organisation – this will be the Company or Persons name and go into the Name fields </li>
<li>Property Name – Name or a Number like Old Stable or 23 or Flat C, 34 </li>
<li>Property No &#8211; If we have a Property Name we will add any other numbers here </li>
<li>Postcode &#8211; this has to be able to find part and whole postcodes for looking up. </li>
</ol>
<p>We can do this project with just 3 objects and a button, and the process flow will be something like this example, for a new customer.</p>
<p>Input the new Customers name or organisation into the name field, in the address field the address name or number, and then we can use the address 2 field if we need it, last we will enter the post code, when we press the button icon, the Customer record gets passed into a codeunit, this loads our four fields into a temporary table, we then open a new form with this table, transfer the information from our temporary record to variables and delete or temporary record, then lookup the postcode, regardless of how many matches we find we will always get the user to confirm the details, then select an address from the list, or do another search if needed, when the user selects OK on the form, we will return the record back to the codeunit and update the customer, so we have just the three objects, table, form and codeunit we are not counting the button as an object. When we are finished we will have learned two valuable skills, running forms on temporary tables and using automation objects, we will have some objects that are almost halfway to a solution, if you want to complete the solution you will need to add error checking for the dll, and the functions for the other address records.</p>
<p>In this tutorial it is assumed that you have installed the evaluation copy of AFD Postcode® and that you are familiar with the following, creating and coding of forms tables and codeunits, if you are unsure how to create functions and set properties with in the Dynamics development environment, then you should start with “Tutorial 1” as this takes you through several of the steps required in this tutorial, any areas not covered in the first tutorial will be explained, in summary detail.</p>
<h5>The Table</h5>
<p>Using the Cronus UK database we create a table based on the standard address format, we have increased some of the field sizes to match the ADF returned field sizes, and save it as 99999 AFD Address Buffer</p>
<p>&#160;<a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image003_2.jpg"><img title="clip_image003" style="display:inline;margin-left:0;margin-right:0;border-width:0;" height="129" alt="clip_image003" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image003_thumb.jpg" width="244" align="left" border="0" /></a></p>
<p>This table required no code as it is only used to store information on temporary bases, and there are a number of tables like this, “Invt. Posting Buffer” and “Invoice Post. Buffer”, are two of the tables used in the Sales and Purchase posting codeunits</p>
<p><b>     <br /></b></p>
<h5>The Form</h5>
<p>Create a form and add these variables <a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image005_2.jpg"><img title="clip_image005" style="display:inline;margin-left:0;margin-right:0;border-width:0;" height="145" alt="clip_image005" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image005_thumb.jpg" width="244" align="left" border="0" /></a></p>
<p>AddArray: Properties – Dimensions – 4</p>
<p>TempAddBuffer: Properties – Temporary – Yes</p>
<p>AFDPcode:</p>
<p>&#160;</p>
<p>&#160;</p>
<p>
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image007_2.jpg"><img title="clip_image007" style="display:inline;border-width:0;" height="212" alt="clip_image007" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image007_thumb.jpg" width="244" border="0" /></a></p>
</td>
<td valign="top">
<p>This automation object exposes the class methods and properties, and we will be using a selection of these in this tutorial, the methods are the functions that will find and search for the postcodes data for the user entered string.</p>
<p>The properties class returns a results set of error codes and the address elements, there are a number of other elements like the grid references, and we will be returning the STD code as well as our address.</p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Layout your form as below:<a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image009_2.jpg"><img title="clip_image009" style="display:inline;margin-left:0;margin-right:0;border-width:0;" height="185" alt="clip_image009" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image009_thumb.jpg" width="244" align="left" border="0" /></a></p>
<p>The Address fields: Properties &#8211; Editable – No</p>
<p>Table box Properties &#8211; Editable – No and Name &#8211; Tablebox</p>
<p>Address count: Properties &#8211; SourceExpr &#8211; TempAddBuffer.COUNTAPPROX</p>
<p>Save the form.</p>
<p>&#160;</p>
<p>Coding the form</p>
<p>View the forms code and enter the following:</p>
<p><b>Form &#8211; OnFindRecord(Which : Text[1024]) : Boolean</b></p>
<p>TempAddBuffer := Rec;</p>
<p>IF NOT TempAddBuffer.FIND(Which) THEN</p>
<p>&#160;&#160;&#160; EXIT(FALSE);</p>
<p>Rec := TempAddBuffer;</p>
<p>EXIT(TRUE);</p>
<p>&#160;</p>
<p>For the OnNextRecord section add a local variable, select the section, then View the C/AL Locals add the variable CurrentSteps type Integer</p>
<p><b>Form &#8211; OnNextRecord(Steps : Integer) : Integer</b></p>
<p>TempAddBuffer := Rec;</p>
<p>CurrentSteps := TempAddBuffer.NEXT(Steps);</p>
<p>IF CurrentSteps &lt;&gt; 0 THEN</p>
<p>&#160;&#160;&#160; Rec := TempAddBuffer;</p>
<p>EXIT(CurrentSteps);</p>
<p>&#160;</p>
<p>I found the code structure on the navigate form 344, this uses a temporary record to display results, and our form is the same and uses some of this code.</p>
<p>Next we will create three functions,</p>
<p>This function just checks for a numeric value.</p>
<p>Name = IsNumeric – Parameter = Value Text 60 – Return Value = Boolean Variable – AddProperty = Integer</p>
<p>&#160;</p>
<p><b>IsNumeric(Value : Text[60]) : Boolean</b></p>
<p>EXIT(EVALUATE(AddProperty,Value));</p>
<p>&#160;</p>
<p>Our second function updates the form based on the returned record set, if we have none or one matching record then we do not need to show our table box, if we have many records then the user can choose, which record they want to use.</p>
<p>Name = UpdateAfterFindRecords – Parameter = None – Return Value = None</p>
<p>Properties – Local &#8211; Yes</p>
<p>&#160;</p>
<p><b>UpdateAfterFindRecords()</b></p>
<p>RecExists := TempAddBuffer.FIND(&#8216;-&#8217;);</p>
<p>CurrForm.UPDATE(FALSE);</p>
<p>IF RecExists THEN BEGIN</p>
<p>&#160;&#160; IF TempAddBuffer.COUNTAPPROX &gt; 1 THEN BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160; CurrForm.TableBox.VISIBLE(TRUE);</p>
<p>&#160;&#160;&#160;&#160;&#160; CurrForm.Address.ACTIVATE;</p>
<p>&#160;&#160;&#160;&#160;&#160; CurrForm.UPDATE(FALSE);</p>
<p>&#160;&#160; END ELSE</p>
<p>&#160;&#160;&#160;&#160;&#160; CurrForm.TableBox.VISIBLE(FALSE);</p>
<p>END ELSE</p>
<p>&#160;&#160; CurrForm.TableBox.VISIBLE(FALSE);</p>
<p>&#160;</p>
<p>Our Last function does all the work finds the records and updates the form, and the way it works is it tries to find a match for the input string, failing to find a match it then moves on to search and returns a list of addresses.</p>
<p>Name = SearchPostCode – Parameter = None – Return Value = Boolean</p>
<p>Properties – Local &#8211; Yes</p>
<p>&#160;</p>
<p>&#160;</p>
<p><b>SearchPostCode() : Boolean</b></p>
<p><i>//Checks if there is a string to lookup</i></p>
<p>IF AddArray[4] = &#8221; THEN</p>
<p>&#160;&#160; EXIT;</p>
<p>&#160;</p>
<p><i>//If the automation object is not initialized then create it</i></p>
<p>IF ISCLEAR(AFDPcode) THEN</p>
<p>&#160;&#160; CREATE(AFDPcode);</p>
<p>&#160;</p>
<p><i>//Initialize our variables</i></p>
<p>RecNo := 0;</p>
<p>TempAddBuffer.DELETEALL;</p>
<p>&#160;</p>
<p><i>//Try to find a match by postcode</i></p>
<p>AFDPcode.FastFind(AddArray[4]);</p>
<p>&#160;</p>
<p><i>//If it has succeeded then a 0 is returned if it failed then search </i></p>
<p>IF AFDPcode.Result &lt;&gt; 0 THEN</p>
<p>&#160;&#160; AFDPcode.DoSearch();</p>
<p>&#160;</p>
<p><i>//If we have one or more matches add them to our table</i></p>
<p>IF AFDPcode.Result = 0 THEN BEGIN</p>
<p>&#160;&#160; REPEAT</p>
<p>&#160;&#160;&#160;&#160;&#160; RecNo := RecNo + 1;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.INIT;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;No.&quot; := RecNo;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Name := AddArray[1];</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Address := AFDPcode.Street;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Address 2&quot; := AFDPcode.Locality;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.City := AFDPcode.Town;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.County := AFDPcode.County;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Post Code&quot; := AFDPcode.Postcode;</p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.STD := AFDPcode.STDCode;</p>
<p>&#160;</p>
<p><i>&#160;&#160;&#160;&#160;&#160; //If user has Input property Name and Property Number</i></p>
<p>&#160;&#160;&#160;&#160;&#160; IF (AddArray[2]&lt;&gt;&#8221;)AND(AddArray[3]&lt;&gt;&#8221;)THEN BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IF ((STRLEN(TempAddBuffer.Address))+</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (STRLEN(AddArray[3]))+2)&lt; 50 THEN BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IF IsNumeric(COPYSTR(AddArray[3],STRLEN(AddArray[3])))THEN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Address 2&quot; := STRSUBSTNO(&#8216;%1 %2&#8242;,AddArray[3],TempAddBuffer.Address)</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ELSE</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Address 2&quot; := STRSUBSTNO(&#8216;%1, %2&#8242;,AddArray[3],TempAddBuffer.Address);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Address := AddArray[2];</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; END ELSE BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Name 2&quot; := AddArray[2];</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Address 2&quot; := TempAddBuffer.Address;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Address := AddArray[3];</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; END;</p>
<p>&#160;&#160;&#160;&#160;&#160; END;</p>
<p><i>&#160;&#160;&#160;&#160;&#160; </i></p>
<p><i>&#160;&#160;&#160;&#160;&#160; //If user has Input Property Number only</i></p>
<p>&#160;&#160;&#160;&#160;&#160; IF (AddArray[2]&lt;&gt;&#8221;)AND(AddArray[3]=&#8221;)THEN BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IF ((STRLEN(TempAddBuffer.Address))+</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (STRLEN(AddArray[2]))+2)&lt; 50 THEN BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; IF IsNumeric(COPYSTR(AddArray[2],STRLEN(AddArray[2])))THEN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Address := STRSUBSTNO(&#8216;%1 %2&#8242;,AddArray[2],TempAddBuffer.Address)</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ELSE</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Address := STRSUBSTNO(&#8216;%1, %2&#8242;,AddArray[2],TempAddBuffer.Address);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; END ELSE BEGIN</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.&quot;Address 2&quot; := TempAddBuffer.Address;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TempAddBuffer.Address := AddArray[2];</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; END;</p>
<p>&#160;&#160;&#160;&#160;&#160; END;</p>
<p><i>&#160;&#160;&#160;&#160; </i></p>
<p><i>&#160;&#160;&#160;&#160;&#160; //Note: that here we set a maximum retrieval of 100 records </i></p>
<p>&#160;&#160;&#160;&#160;&#160; TempAddBuffer.INSERT;</p>
<p>&#160;&#160; UNTIL (AFDPcode.GetNextRecord &lt; 0) OR (RecNo = 1000)</p>
<p>END;</p>
<p>Rec := TempAddBuffer;</p>
<p>UpdateAfterFindRecords;</p>
<p>&#160;</p>
<p>This deals with the different input scenarios, we will test them later.</p>
<p>This code can now be added</p>
<p>&#160;</p>
<p><b>Form &#8211; OnOpenForm()</b></p>
<p><i>//f we have passed in a tempory record use the values to search</i></p>
<p>IF FIND(&#8216;-&#8217;)THEN BEGIN</p>
<p>&#160;&#160; AddArray[1]:= Name;</p>
<p>&#160;&#160; AddArray[2]:= Address;</p>
<p>&#160;&#160; AddArray[3]:= &quot;Address 2&quot;;</p>
<p>&#160;&#160; AddArray[4]:= &quot;Post Code&quot;;</p>
<p><i>&#160;&#160; </i></p>
<p><i>&#160;&#160; //Now we can delete our calling record </i></p>
<p>&#160;&#160; DELETEALL;</p>
<p><i>&#160;&#160; </i></p>
<p><i>&#160;&#160; //Find our record set and insert it</i></p>
<p>&#160;&#160; SearchPostCode;</p>
<p>END;</p>
<p>&#160;</p>
<p><i>//Update our form</i></p>
<p>UpdateAfterFindRecords;</p>
<p>&#160;</p>
<p>Code for the Search button:</p>
<p><b>Search &#8211; OnPush()</b></p>
<p>SearchPostCode;</p>
<h5>Codeunit</h5>
<p>This will be similar to the Format Address codeunit, except that instead of getting an address array back we get a record with the address added.</p>
<p>&#160;</p>
<p>Create a new Codeunit and add a variable tempAddBuffer – Record &#8211; Address Buffer</p>
<p>Add a new function Name &#8211; findAddress with these parameters and variable and the following Properties &#8211; Local –Yes</p>
<p>&#160;</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image011_2.jpg"><img title="clip_image011" style="display:inline;border-width:0;" height="131" alt="clip_image011" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image011_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image013_2.jpg"><img title="clip_image013" style="display:inline;border-width:0;" height="131" alt="clip_image013" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image013_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>Add another function CustFindAddress</p>
<p>Parmeter &#8211; Var – Customer Record &#8211; Customer</p>
<p>This function receives the Customer record and passes it’s fields to findAddress</p>
<p>&#160;</p>
<p><b>custFindAddress(VAR Customer : Record Customer)</b></p>
<p>WITH Customer DO BEGIN</p>
<p>&#160;&#160; // Not a Local Customer so Get Out</p>
<p>&#160;&#160; IF Customer.&quot;Country Code&quot; &lt;&gt; &#8221; THEN</p>
<p>&#160;&#160;&#160;&#160;&#160; EXIT;</p>
<p>&#160;</p>
<p>&#160;&#160; findAddress(Name,&quot;Name 2&quot;,Address,&quot;Address 2&quot;,City,County,&quot;Post Code&quot;);</p>
<p>&#160;&#160;&#160;&#160;&#160; EXIT;</p>
<p>END;</p>
<p>&#160;</p>
<p><b>findAddress(VAR Name : Text[50];VAR Name2 : Text[50];VAR Address : Text[50];VAR Address2 : Text[50];VAR City : Text[30];VAR County : Te</b></p>
<p>IF postCode = &#8221; THEN</p>
<p>&#160;&#160; EXIT;</p>
<p>tempAddBuffer.DELETEALL;</p>
<p>&#160;</p>
<p><i>//Add the fields here to pass to our form to populate the AddArray</i></p>
<p>tempAddBuffer.INIT;</p>
<p>tempAddBuffer.&quot;No.&quot; := RecNo;</p>
<p>tempAddBuffer.Name := Name;</p>
<p>tempAddBuffer.Address := Address;</p>
<p>tempAddBuffer.&quot;Address 2&quot; := Address2;</p>
<p>tempAddBuffer.&quot;Post Code&quot; := postCode;</p>
<p>tempAddBuffer.INSERT;</p>
<p>&#160;</p>
<p><i>//Run our form with the temporary record transfer the fields if selected</i></p>
<p>IF FORM.RUNMODAL(FORM::&quot;AFD Postcode&quot;,tempAddBuffer) = ACTION::LookupOK THEN BEGIN</p>
<p>&#160;&#160; Name := tempAddBuffer.Name;</p>
<p>&#160;&#160; Name2 := tempAddBuffer.&quot;Name 2&quot;;</p>
<p>&#160;&#160; Address := tempAddBuffer.Address;</p>
<p>&#160;&#160; Address2 := tempAddBuffer.&quot;Address 2&quot;;</p>
<p>&#160;&#160; City := tempAddBuffer.City;</p>
<p>&#160;&#160; County := tempAddBuffer.County;</p>
<p>&#160;&#160; postCode := tempAddBuffer.&quot;Post Code&quot;;</p>
<p>END;</p>
<p>&#160;</p>
<p>Save your work and we are nearly done</p>
<p>Last object to change is the Customer Card form 21, here we are going to add a button to do a search the for the post code based on our input, we need to add a new button just next to the post code field, with the lookup search icon</p>
<p>&#160;</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image015_2.jpg"><img title="clip_image015" style="display:inline;border-width:0;" height="139" alt="clip_image015" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image015_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image017_2.jpg"><img title="clip_image017" style="display:inline;border-width:0;" height="201" alt="clip_image017" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image017_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>View the code for the button and add a</p>
<p>Local variable AFDPostcodeMgnt – Codeunit – AFD Postcode Management</p>
<p>Now all we need is the following code</p>
<p>&#160;</p>
<p><b>- OnPush()</b></p>
<p>// Cronus 21/05/2006 Adeptris</p>
<p>AFDPostcodeMgnt.custFindAddress(Rec);</p>
<p>CurrForm.UPDATE;</p>
<p>&#160;</p>
<p>So let’s look at the results, AFD Evaluation copy has a limited amount of data which does not expire, so we can test our different scenarios</p>
<p>We have company Name – Premises Name and a number</p>
<p>&#160;</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image019_2.jpg"><img title="clip_image019" style="display:inline;border-width:0;" height="130" alt="clip_image019" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image019_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>Result</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image021_2.jpg"><img title="clip_image021" style="display:inline;border-width:0;" height="178" alt="clip_image021" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image021_thumb.jpg" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>If we have only the house number then it is input into Address field</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image023_2.jpg"><img title="clip_image023" style="display:inline;border-width:0;" height="178" alt="clip_image023" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image023_thumb.jpg" width="244" border="0" /></a></p>
<p>300 Record matches with the partial postcode of B5, we could have a maximum 1000</p>
<p>&#160;</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image025_2.jpg"><img title="clip_image025" style="display:inline;border-width:0;" height="178" alt="clip_image025" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image025_thumb.jpg" width="244" border="0" /></a>#</p>
<p>That’s it for our different input scenarios</p>
<p><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image027_2.jpg"><img title="clip_image027" style="display:inline;border-width:0;" height="178" alt="clip_image027" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image027_thumb.jpg" width="244" border="0" /></a></p>
<h5>Conclusion</h5>
<p>This is not a ready to use solution, to develop it further; you need to add the different functions in the AFD Postcode Management codeunit for Vendor, Bank, Ship-To etc:</p>
<p>On our form you need code to see if AFD is installed it can be as simple as</p>
<p>IF NOT EXISTS(c:\Windows\System32\postcode.dll)THEN</p>
<p>EXIT;</p>
<p>For the AFD Error trapping a variable ErrorText and a box on the form, then in the code just add the following after the calls to the dll.</p>
<p>ErrorText := AFDPcode.ResultText;</p>
<p>The best way to learn Dynamics coding is to get in and have a look, this solution has used 3 objects, and the upgrade path is simple, drop the button back on the forms.</p>
<p>Please use the feedback section on my website <a href="/">www.adeptris.com</a> and let me know how you found this tutorial, so I cam make the next one better.</p>
<h3>&#160;</h3>
<p><b>     <br /></b></p>
<h3><a class="itcexpando" href="/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image029_2.jpg"><img title="clip_image029" style="display:inline;border-width:0;" height="95" alt="clip_image029" src="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image029_thumb.jpg" width="244" border="0" /></a></h3>
<p><a href="http://www.afd.co.uk/index.asp">&#8216;AFD&#8217;</a>, <a href="http://www.afd.co.uk/postcode.asp">&#8216;AFD POSTCODE&#8217;</a>, <a href="http://www.afd.co.uk/zipaddress.asp">&#8216;ZIPADDRESS&#8217;</a>, and the Flying Envelope Device are Registered Trade Marks of ZipAddress Ltd. &#8216;ROBOT&#8217; Technology is protected by Patent No GB2369699.     <br />All other trade marks acknowledged.     <br />AFD Products are subject to a <a href="http://www.afd.co.uk/eula.htm">License Agreement</a> and include a data license for one computer, renewable annually</p>
<h3>DOCUMENT COPYRIGHT</h3>
<p>The authors that contributed to this Adeptris.com tutorial are delighted to share their work with others.    <br />Please recognize the hard work and integrity of our contributing authors by giving them appropriate credit and citing references on any material that you share with others.     <br />Permission is granted to reproduce this material in whole or in part for educational purposes only (not-for-profit beyond cost of reproduction) provided that the authors receive acknowledgement and this notice is included:</p>
<p>Any additions or changes to these materials must be pre-approved by the author.    <br />NOTE: On most Adeptris.com documents Author Access information is placed at the bottom of the document</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adeptrisnav.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adeptrisnav.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/adeptrisnav.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/adeptrisnav.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adeptrisnav.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adeptrisnav.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adeptrisnav.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adeptrisnav.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adeptrisnav.wordpress.com&amp;blog=8307540&amp;post=7&amp;subd=adeptrisnav&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://adeptrisnav.wordpress.com/2009/06/24/afd-postcode-integration-for-mbs-dynamics-nav/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cf653aa2fd3dacd42fc4ef81281b010d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">adeptris</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image003_thumb.jpg" medium="image">
			<media:title type="html">clip_image003</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image005_thumb.jpg" medium="image">
			<media:title type="html">clip_image005</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image007_thumb.jpg" medium="image">
			<media:title type="html">clip_image007</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image009_thumb.jpg" medium="image">
			<media:title type="html">clip_image009</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image011_thumb.jpg" medium="image">
			<media:title type="html">clip_image011</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image013_thumb.jpg" medium="image">
			<media:title type="html">clip_image013</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image015_thumb.jpg" medium="image">
			<media:title type="html">clip_image015</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image017_thumb.jpg" medium="image">
			<media:title type="html">clip_image017</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image019_thumb.jpg" medium="image">
			<media:title type="html">clip_image019</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image021_thumb.jpg" medium="image">
			<media:title type="html">clip_image021</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image023_thumb.jpg" medium="image">
			<media:title type="html">clip_image023</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image025_thumb.jpg" medium="image">
			<media:title type="html">clip_image025</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image027_thumb.jpg" medium="image">
			<media:title type="html">clip_image027</media:title>
		</media:content>

		<media:content url="http://www.adeptris.com/Portals/0/images/%5BProvider%5D/%5BFolderFilePath%5D/WLW/AFDpostcodeintegrationforMBSDynamicsNAVG_6A6E/clip_image029_thumb.jpg" medium="image">
			<media:title type="html">clip_image029</media:title>
		</media:content>
	</item>
	</channel>
</rss>
