deploy: 9e06f72056
This commit is contained in:
parent
de09820554
commit
e4f08bf9a7
187 changed files with 6620 additions and 6342 deletions
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/1-patterns/singleton/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>Singleton :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/1-patterns/singleton/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -264,7 +264,7 @@ ALGuidelines.Dev
|
|||
<li><strong>Lost reference to centralizer:</strong> An instance of a relevant object could attempt to centralize control or data in the system. However, once this object is no longer in scope, the reference to it is lost and cannot be retrieved for later coordination</li>
|
||||
<li><strong>Cannot rebuild the initial state:</strong> A new instance of the same object could be created, however the last known state of the lost instance cannot be known anymore.</li>
|
||||
</ul>
|
||||
<p><strong>Solution:</strong> create an object which resides in memory in a single copy (instance). Have a way to retrieve this unique object from code. This object can either be a <a href=/nav/w/designpatterns/151.singleton-table><strong>Singleton Table</strong></a>, or a <a href=/nav/w/designpatterns/283.singleton-codeunit><strong>Singleton Codeunit</strong></a>.</p>
|
||||
<p><strong>Solution:</strong> create an object which resides in memory in a single copy (instance). Have a way to retrieve this unique object from code. This object can either be a <a href=/navpatterns/1-patterns/singleton/singleton-table/><strong>Singleton Table</strong></a>, or a <a href=/navpatterns/1-patterns/singleton/singleton-codeunit/><strong>Singleton Codeunit</strong></a>.</p>
|
||||
<p>The implementation varies depending on the technology and language used. In object-oriented (OO) languages like C#, C++ or Java, the <strong>Singleton</strong> uses static classes and class members to instantiate. There is a mechanism to ensure only one instance of the object can exist. This mechanism is many times explicit (like in OO languages) and sometimes implicit as part of the compiler or platform (as it is in NAV).</p>
|
||||
<p><strong>Benefits:</strong></p>
|
||||
<ul>
|
||||
|
|
@ -284,12 +284,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Singleton on AL Guidelines</title><link>https://alguidelines.dev/navpatterns/1-patterns/singleton/</link><description>Recent content in Singleton on AL Guidelines</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://alguidelines.dev/navpatterns/1-patterns/singleton/index.xml" rel="self" type="application/rss+xml"/><item><title>Singleton Table</title><link>https://alguidelines.dev/navpatterns/1-patterns/singleton/singleton-table/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/1-patterns/singleton/singleton-table/</guid><description>Singleton Table By Elly Nkya at Microsoft Development Center Copenhagen
|
||||
_
|
||||
_
|
||||
Problem: The developer needs to define a single record that can contain a set of rules and behavior (optional, mandatory, or defaulting mechanisms), that apply to a functionality, and can be configured by a user.
|
||||
Forces
|
||||
You want a central place to define the address and logo of your company (see Company Information table). You want to define the no.</description></item><item><title>Singleton Codeunit</title><link>https://alguidelines.dev/navpatterns/1-patterns/singleton/singleton-codeunit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://alguidelines.dev/navpatterns/1-patterns/singleton/singleton-codeunit/</guid><description>By Bogdana Botez at Microsoft Development Center Copenhagen
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Singleton Codeunit :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/1-patterns/singleton/singleton-codeunit/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -267,25 +267,26 @@ ALGuidelines.Dev
|
|||
<p>Take for example the following test of Azure ML (Azure Machine Learning) integration with NAV.</p>
|
||||
<p>Context: Azure Machine Learning services are paid. However, Dynamics NAV includes a monthly pre-paid quota of Azure ML, which can be used for free by the users. There is an upper limit to this quota, and when it is reached, Azure ML services are turned off until the next month starts and a new quota becomes available for consumption.</p>
|
||||
<p>The test below checks that, when the monthly quota is exceeded, then the function IsAzureMLLimitReached returns TRUE.</p>
|
||||
<pre><code>\[Test\]
|
||||
PROCEDURE AzureMLProcessingTimeExceedsLimit@11();
|
||||
VAR
|
||||
AzureMachineLearningUsage@1004 : Record 2002;
|
||||
ProcessingTime@1000 : Decimal;
|
||||
BEGIN
|
||||
// \[SCENARIO\] Azure Machine Learning Processing time exceeds AzureML limit
|
||||
// \[GIVEN\] AzureMachineLearningUsage \> 0
|
||||
Initialize; // calls PermissionManager.SetTestabilitySoftwareAsAService(TRUE);
|
||||
ProcessingTime := LibraryRandom.RandDec(1000,2);
|
||||
AzureMachineLearningUsage.IncrementTotalProcessingTime(ProcessingTime);
|
||||
// \[WHEN\] When IsAzureMLLimitReached is invoked with Limit more than Processing time
|
||||
// \[THEN\] HasAzureLimitReached returns TRUE
|
||||
Assert.IsTrue(AzureMachineLearningUsage.IsAzureMLLimitReached(ProcessingTime - 1),
|
||||
'HasAzureLimitReached returns wrong value when Processing time exceeds Limit.');
|
||||
PermissionManager.SetTestabilitySoftwareAsAService(FALSE);
|
||||
END;
|
||||
</code></pre>
|
||||
<p>The figure below explains what happens when the Permission Manager is not a singleton. When it is invoked from different places (first from the test, second from the production code), then different instances of the Permission Manager will fire up and answer. In detail:</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>[Test]
|
||||
<span style=color:#66d9ef>PROCEDURE</span> AzureMLProcessingTimeExceedsLimit@<span style=color:#ae81ff>11</span><span style=color:#f92672>()</span>;
|
||||
<span style=color:#66d9ef>VAR</span>
|
||||
AzureMachineLearningUsage@<span style=color:#ae81ff>1004</span> : <span style=color:#66d9ef>Record</span> <span style=color:#ae81ff>2002</span>;
|
||||
ProcessingTime@<span style=color:#ae81ff>1000</span> : <span style=color:#66d9ef>Decimal</span>;
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#75715e>// [SCENARIO] Azure Machine Learning Processing time exceeds AzureML limit
|
||||
</span><span style=color:#75715e></span>
|
||||
<span style=color:#75715e>// [GIVEN] AzureMachineLearningUsage > 0
|
||||
</span><span style=color:#75715e></span> Initialize; <span style=color:#75715e>// calls PermissionManager.SetTestabilitySoftwareAsAService(TRUE);
|
||||
</span><span style=color:#75715e></span> ProcessingTime <span style=color:#f92672>:=</span> LibraryRandom<span style=color:#f92672>.</span>RandDec<span style=color:#f92672>(</span><span style=color:#ae81ff>1000</span>,<span style=color:#ae81ff>2</span><span style=color:#f92672>)</span>;
|
||||
AzureMachineLearningUsage<span style=color:#f92672>.</span>IncrementTotalProcessingTime<span style=color:#f92672>(</span>ProcessingTime<span style=color:#f92672>)</span>;
|
||||
|
||||
<span style=color:#75715e>// [WHEN] When IsAzureMLLimitReached is invoked with Limit more than Processing time
|
||||
</span><span style=color:#75715e></span> <span style=color:#75715e>// [THEN] HasAzureLimitReached returns TRUE
|
||||
</span><span style=color:#75715e></span> Assert<span style=color:#f92672>.</span>IsTrue<span style=color:#f92672>(</span>AzureMachineLearningUsage<span style=color:#f92672>.</span>IsAzureMLLimitReached<span style=color:#f92672>(</span>ProcessingTime - <span style=color:#ae81ff>1</span><span style=color:#f92672>)</span>,
|
||||
<span style=color:#e6db74>'HasAzureLimitReached returns wrong value when Processing time exceeds Limit.'</span><span style=color:#f92672>)</span>;
|
||||
PermissionManager<span style=color:#f92672>.</span>SetTestabilitySoftwareAsAService<span style=color:#f92672>(</span>FALSE<span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>The figure below explains what happens when the Permission Manager is not a singleton. When it is invoked from different places (first from the test, second from the production code), then different instances of the Permission Manager will fire up and answer. In detail:</p>
|
||||
<ol>
|
||||
<li>The test calls Initialize which sets SaaS=TRUE in codeunit Permission Manager</li>
|
||||
<li>The test calls into production code to validate it works as expected. It calls AzureMachineLearningUsage codeunit to find out if the monthly quota has been reached. The function IsAzureMLLimitReached in AzureMachineLearningUsage codeunit is designed only for SaaS. If the code doesn’t run in SaaS, then it always returns FALSE.</li>
|
||||
|
|
@ -294,13 +295,11 @@ END;
|
|||
<li>The production code will assess (wrongly) that it’s not running SaaS, and say that the Azure ML limit has not been reached (incorrect – and the test fails).</li>
|
||||
</ol>
|
||||
<p><a href=Singleton-Codeunit-_2D00_-example-_2D00_-bad.PNG><img src=Singleton-Codeunit-_2D00_-example-_2D00_-bad.PNG alt=" "></a></p>
|
||||
<hr>
|
||||
<p><strong>Solution:</strong> restrict the number of instantiations of a codeunit to only one, by setting the codeunit property <strong>SingleInstance</strong> to <strong>Yes</strong>.</p>
|
||||
<p>Returning to the previous example, let’s analyze the case when the codeunit Permission Manager is a singleton codeunit:</p>
|
||||
<p><a href=2313.Singleton-Codeunit-_2D00_-CSIDE-SingleInstance-property.PNG><img src=2313.Singleton-Codeunit-_2D00_-CSIDE-SingleInstance-property.PNG alt=" "></a></p>
|
||||
<p>When the codeunit Permission Manager is a singleton, then no matter from where it is invoked, the same instance will be reached. Therefore, the status set by the test (SaaS = TRUE) will be reachable from the production code, and the test will pass, as seen in the figure below.</p>
|
||||
<p>**<a href=Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG><img src=Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG alt=" "></a><br>
|
||||
**</p>
|
||||
<p><a href=Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG><img src=Singleton-Codeunit-_2D00_-example-_2D00_-good.PNG alt=" "></a></p>
|
||||
<p><strong>Consequences</strong></p>
|
||||
<p>1. Use Singleton Codeunit with care and only when there is no other solution. Preserving a global state could often enough be more harmful than useful. One risk is that tests might fail apparently non-deterministically.</p>
|
||||
<p>For example, a problem we have met in the development team for Madeira release, was that the singleton codeunit function PermissionManager.SetSoftwareAsAService(TRUE) is often used to emulate and test SaaS conditions. However, if a test ‘forgets’ to reset the state to default (FALSE), then another codeunit which is not supposed to emulate SaaS, will suddenly run as SaaS and will fail. Even if the test has code that resets the state to FALSE, this code might never be reached because of an earlier failure or other error in the test which would stop execution.</p>
|
||||
|
|
@ -318,7 +317,6 @@ END;
|
|||
<li>Etc.</li>
|
||||
</ul>
|
||||
<p><strong>Note:</strong> while the object-oriented <strong>Singleton</strong> pattern can restrict the number of instantiations of the singleton to an integer n > 0, in Dynamics NAV the <strong>Singleton Codeunit</strong> can only have n=1.</p>
|
||||
<p>__</p>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -331,12 +329,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Cue Table :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/1-patterns/singleton/singleton-table/cue-table/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -258,72 +258,112 @@ ALGuidelines.Dev
|
|||
<h1>Cue Table</h1>
|
||||
<p><em>By Bogdana Botez at Microsoft Development Center Copenhagen</em></p>
|
||||
<p><a href=Cue-Table.png><img src=Cue-Table.png alt=" "></a></p>
|
||||
<p>Cues are the second usual application of the <a href=/nav/w/designpatterns/151.singleton-table><strong>Singleton Table</strong></a> pattern in Dynamics NAV, after <a href=/nav/w/designpatterns/76.setup-table><strong>Setup Tables</strong></a>.</p>
|
||||
<p>Cues are the second usual application of the <a href=/navpatterns/1-patterns/singleton/singleton-table/><strong>Singleton Table</strong></a> pattern in Dynamics NAV, after <a href=/navpatterns/1-patterns/singleton/singleton-table/setup-table/><strong>Setup Tables</strong></a>.</p>
|
||||
<p><strong>Context</strong>: The user gets overview information about the business on the Dynamics NAV Role Center page.</p>
|
||||
<p>Figure 1 - Cue information in Dynamics NAV shows cue information seen by the user on the <strong>Sales Order Processor</strong> role center.</p>
|
||||
<p><a href=Cue-Table-Figure-1.JPG><img src=Cue-Table-Figure-1.JPG alt=" "></a></p>
|
||||
<p>The overview information consists of summed-up numbers, calculated from business data, like for example how many sales orders are still open, how many shipments are ready to go, or partially shipped, how many documents are waiting for approval etc.</p>
|
||||
<p><strong>Problem</strong>: NAV stores data in tables. By definition, a table is a repetitive structure containing multiple lines, each line having a different piece of the information. But sometimes this repetitive information needs to be summed-up or otherwise synthetized, and presented as an overview.</p>
|
||||
<p><strong>Solution:</strong> Store overview information in a singleton table.</p>
|
||||
<hr>
|
||||
<p>There are two ways of calculating overview information in NAV.</p>
|
||||
<ol>
|
||||
<li>By using a FlowField. This applies for simpler calculations, like filtered or unfiltered counts, sums etc.</li>
|
||||
<li>By writing C/AL code to perform custom calculations. Use this when:</li>
|
||||
</ol>
|
||||
<ul>
|
||||
<li>
|
||||
<p>By using a FlowField. This applies for simpler calculations, like filtered or unfiltered counts, sums etc.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>By writing C/AL code to perform custom calculations. Use this when:</p>
|
||||
<ul>
|
||||
<li>The way to calculate the overview is too complex for flow fields, or</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>The data needs to be pulled from an external system (like Dynamics CRM, QuickBooks or any external integration).</li>
|
||||
</ul>
|
||||
<hr>
|
||||
</li>
|
||||
</ol>
|
||||
<p>The implementation of Cues is already described in detail on MSDN, in <a href="https://msdn.microsoft.com/en-us/library/dn789553(v=nav.90).aspx">Creating and Customizing Cues</a> and in <a href="https://msdn.microsoft.com/en-us/library/ff477101(v=nav.90).aspx">Walkthrough: Creating a Cue Based on a FlowField</a>.</p>
|
||||
<p><strong>NAV Usages</strong></p>
|
||||
<p><em>Table 1 - Cue tables in Dynamics NAV</em> shows some examples of singleton tables used for creating Cues.</p>
|
||||
<p>Table ID</p>
|
||||
<p>Table Name</p>
|
||||
<p>1313</p>
|
||||
<p>Activities Cue</p>
|
||||
<p>5370</p>
|
||||
<p>CRM Synch. Job Status Cue</p>
|
||||
<p>9042</p>
|
||||
<p>Team Member Cue</p>
|
||||
<p>9050</p>
|
||||
<p>Warehouse Basic Cue</p>
|
||||
<p>9051</p>
|
||||
<p>Warehouse WMS Cue</p>
|
||||
<p>9052</p>
|
||||
<p>Service Cue</p>
|
||||
<p>9053</p>
|
||||
<p>Sales Cue</p>
|
||||
<p>9054</p>
|
||||
<p>Finance Cue</p>
|
||||
<p>9055</p>
|
||||
<p>Purchase Cue</p>
|
||||
<p>9056</p>
|
||||
<p>Manufacturing Cue</p>
|
||||
<p>9057</p>
|
||||
<p>Job Cue</p>
|
||||
<p>9058</p>
|
||||
<p>Warehouse Worker WMS Cue</p>
|
||||
<p>9059</p>
|
||||
<p>Administration Cue</p>
|
||||
<p>9060</p>
|
||||
<p>SB Owner Cue</p>
|
||||
<p>9061</p>
|
||||
<p>RapidStart Services Cue</p>
|
||||
<p>9063</p>
|
||||
<p>Relationship Mgmt. Cue</p>
|
||||
<p>9069</p>
|
||||
<p>O365 Sales Cue</p>
|
||||
<p>9070</p>
|
||||
<p>Accounting Services Cue</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Table ID</th>
|
||||
<th>Table Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1313</td>
|
||||
<td>Activities Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5370</td>
|
||||
<td>CRM Synch. Job Status Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9042</td>
|
||||
<td>Team Member Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9050</td>
|
||||
<td>Warehouse Basic Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9051</td>
|
||||
<td>Warehouse WMS Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9052</td>
|
||||
<td>Service Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9053</td>
|
||||
<td>Sales Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9054</td>
|
||||
<td>Finance Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9055</td>
|
||||
<td>Purchase Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9056</td>
|
||||
<td>Manufacturing Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9057</td>
|
||||
<td>Job Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9058</td>
|
||||
<td>Warehouse Worker WMS Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9059</td>
|
||||
<td>Administration Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9060</td>
|
||||
<td>SB Owner Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9061</td>
|
||||
<td>RapidStart Services Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9063</td>
|
||||
<td>Relationship Mgmt. Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9069</td>
|
||||
<td>O365 Sales Cue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9070</td>
|
||||
<td>Accounting Services Cue</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Table 1 - Cue tables in Dynamics NAV</p>
|
||||
<hr>
|
||||
<p>_</p>
|
||||
<footer class=footline>
|
||||
</footer>
|
||||
</main>
|
||||
|
|
@ -336,12 +376,12 @@ ALGuidelines.Dev
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
<link rel=alternate type=application/rss+xml href=/navpatterns/1-patterns/singleton/singleton-table/index.xml title="AL Guidelines">
|
||||
<meta name=description content>
|
||||
<title>Singleton Table :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506471 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506471 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506471></script>
|
||||
<link href=/css/nucleus.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600601 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600601 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600601></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/1-patterns/singleton/singleton-table/>
|
||||
|
|
@ -33,9 +33,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506471></script>
|
||||
<script src=/js/auto-complete.js?1644506471></script>
|
||||
<script src=/js/search.js?1644506471></script>
|
||||
<script src=/js/lunr.min.js?1644600601></script>
|
||||
<script src=/js/auto-complete.js?1644600601></script>
|
||||
<script src=/js/search.js?1644600601></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -251,7 +251,6 @@ ALGuidelines.Dev
|
|||
<nav id=TableOfContents>
|
||||
<ul>
|
||||
<li><a href=#singleton-table>Singleton Table</a></li>
|
||||
<li><a href=#-image0anchor0><a href=5554.Singleton-Table.png><img src=5554.Singleton-Table.png alt=" "></a></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
@ -263,11 +262,8 @@ ALGuidelines.Dev
|
|||
<h1>Singleton Table</h1>
|
||||
<h2 id=singleton-table>Singleton Table</h2>
|
||||
<p><em>By Elly Nkya at Microsoft Development Center Copenhagen</em></p>
|
||||
<h2 id=-image0anchor0><a href=5554.Singleton-Table.png><img src=5554.Singleton-Table.png alt=" "></a></h2>
|
||||
<p>_<br>
|
||||
_</p>
|
||||
<p><a href=5554.Singleton-Table.png><img src=5554.Singleton-Table.png alt=" "></a></p>
|
||||
<p><strong>Problem</strong>: The developer needs to define a single record that can contain a set of rules and behavior (optional, mandatory, or defaulting mechanisms), that apply to a functionality, and can be configured by a user.</p>
|
||||
<hr>
|
||||
<p><strong>Forces</strong></p>
|
||||
<ul>
|
||||
<li>You want a central place to define the address and logo of your company (see Company Information table).</li>
|
||||
|
|
@ -282,43 +278,38 @@ _</p>
|
|||
<p><strong>2. Instantiate:</strong> Place the instantiation code in a central place where it is guaranteed to be invoked before the functionality uses it. This is done in Codeunit 2.</p>
|
||||
<p><strong>3. Enforce:</strong> Give the user access to the record so that he can change the default setup, by creating a Card page. On the page, enforce the singleton to prevent deletion of the record or insertion of a new record</p>
|
||||
<p><strong>4. Use:</strong> Access the rule in code and use it</p>
|
||||
<hr>
|
||||
<p><strong>NAV Usages</strong></p>
|
||||
<p>Rounding rules for Unit-Amounts and Amounts are implemented using the Singleton pattern.</p>
|
||||
<p><strong>1. Define:</strong> The General Ledger Setup is used for this.</p>
|
||||
<p><strong>2. Instantiate:</strong> In codeunit 2, the following code is invoked</p>
|
||||
<pre><code>WITH GLSetup DO
|
||||
IF NOT FINDFIRST THEN BEGIN
|
||||
INIT;
|
||||
INSERT;
|
||||
END;
|
||||
</code></pre>
|
||||
<p><strong>3. Enforce:</strong> On the General Ledger Setup. The following properties are setup:</p>
|
||||
<pre><code>DeleteAllowed=false,
|
||||
InsertAllowed=false
|
||||
</code></pre>
|
||||
<p><strong>4. Use:</strong> Access the rounding rules are used</p>
|
||||
<pre><code>...
|
||||
GLSetup.GET;
|
||||
UnitCostCurrency := ROUND(...,GLSetup."Unit-Amount Rounding Precision");
|
||||
...
|
||||
</code></pre>
|
||||
<p>Or if accessing the rule multiple times and performance is a consideration, use lazy instantiation:</p>
|
||||
<pre><code>...
|
||||
GetGLSetup;
|
||||
UnitCostCurrency := ROUND(...,GLSetup."Unit-Amount Rounding Precision");
|
||||
...
|
||||
|
||||
LOCAL GetGLSetup()
|
||||
IF NOT GLSetupRead THEN
|
||||
GLSetup.GET;
|
||||
GLSetupRead := TRUE;
|
||||
</code></pre>
|
||||
<p><strong>Related topics</strong></p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#66d9ef>WITH</span> GLSetup <span style=color:#66d9ef>DO</span>
|
||||
<span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> FINDFIRST <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
INIT;
|
||||
INSERT;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p><strong>3. Enforce:</strong> On the General Ledger Setup. The following properties are setup:</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al> DeleteAllowed=false,
|
||||
InsertAllowed=false
|
||||
</code></pre></div><p><strong>4. Use:</strong> Access the rounding rules are used</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>GLSetup<span style=color:#f92672>.</span>GET;
|
||||
UnitCostCurrency <span style=color:#f92672>:=</span> ROUND<span style=color:#f92672>(...</span>,GLSetup<span style=color:#f92672>.</span>"Unit-Amount Rounding Precision"<span style=color:#f92672>)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span></code></pre></div><p>Or if accessing the rule multiple times and performance is a consideration, use lazy instantiation:</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al><span style=color:#f92672>...
|
||||
</span><span style=color:#f92672></span>GetGLSetup;
|
||||
UnitCostCurrency <span style=color:#f92672>:=</span> ROUND<span style=color:#f92672>(...</span>,GLSetup<span style=color:#f92672>.</span>"Unit-Amount Rounding Precision"<span style=color:#f92672>)</span>;
|
||||
<span style=color:#f92672>...
|
||||
</span><span style=color:#f92672>
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>LOCAL</span> GetGLSetup<span style=color:#f92672>()
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> GLSetupRead <span style=color:#66d9ef>THEN</span>
|
||||
GLSetup<span style=color:#f92672>.</span>GET;
|
||||
GLSetupRead <span style=color:#f92672>:=</span> TRUE;
|
||||
</code></pre></div><p><strong>Related topics</strong></p>
|
||||
<p><a href=https://en.wikipedia.org/wiki/Singleton_pattern>Singleton design pattern</a>.</p>
|
||||
<p>The <strong>Singleton Table</strong> has two established applications in Dynamics NAV:</p>
|
||||
<ol>
|
||||
<li><a href=/nav/w/designpatterns/76.setup-table><strong>Setup Tables</strong></a> – which are commonly storing user setup data in NAV,</li>
|
||||
<li><a href=/navpatterns/1-patterns/singleton/singleton-table/setup-table/><strong>Setup Tables</strong></a> – which are commonly storing user setup data in NAV,</li>
|
||||
<li><strong>Cue Tables</strong> – used to calculate values for the visual representation of Cues on the NAV role center pages.</li>
|
||||
</ol>
|
||||
<p>YouTube Video of NAV Singleton:</p>
|
||||
|
|
@ -337,12 +328,12 @@ GLSetupRead := TRUE;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506471></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506471></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506471></script>
|
||||
<script src=/js/featherlight.min.js?1644506471></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506471></script>
|
||||
<script src=/js/relearn.js?1644506471></script>
|
||||
<script src=/js/clipboard.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600601></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600601></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600601></script>
|
||||
<script src=/js/featherlight.min.js?1644600601></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600601></script>
|
||||
<script src=/js/relearn.js?1644600601></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Setup Table :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506469 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506469 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506469></script>
|
||||
<link href=/css/nucleus.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600600 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600600 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600600></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/1-patterns/singleton/singleton-table/setup-table/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506469></script>
|
||||
<script src=/js/auto-complete.js?1644506469></script>
|
||||
<script src=/js/search.js?1644506469></script>
|
||||
<script src=/js/lunr.min.js?1644600600></script>
|
||||
<script src=/js/auto-complete.js?1644600600></script>
|
||||
<script src=/js/search.js?1644600600></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -274,14 +274,13 @@ ALGuidelines.Dev
|
|||
<p><strong>Creating a Page</strong></p>
|
||||
<p>The <strong>CardPage</strong> type is most suitable for representing this kind of tables. In addition, the <strong>InsertAllowed</strong> and <strong>DeleteAllowed</strong> properties in the page should be set to false to prevent the user from adding or deleting records in the table.</p>
|
||||
<p>In the <strong>OnOpenPage</strong> trigger, the following code should be added to insert a record when the user opens the page for the first time, if a record does not exist already.</p>
|
||||
<pre><code>OnOpenPage()
|
||||
RESET;
|
||||
IF NOT GET THEN BEGIN
|
||||
INIT;
|
||||
INSERT;
|
||||
END;
|
||||
</code></pre>
|
||||
<p>The following diagram describes the flow of the program, once the user tries to access the setup information. The user opens the page. If the record containing setup information already exists, then the page opens on the existing record. Else, a new empty record is created and the page opens on it.</p>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>OnOpenPage<span style=color:#f92672>()
|
||||
</span><span style=color:#f92672> </span>RESET;
|
||||
<span style=color:#66d9ef>IF</span> <span style=color:#f92672>NOT</span> GET <span style=color:#66d9ef>THEN</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
INIT;
|
||||
INSERT;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><p>The following diagram describes the flow of the program, once the user tries to access the setup information. The user opens the page. If the record containing setup information already exists, then the page opens on the existing record. Else, a new empty record is created and the page opens on it.</p>
|
||||
<p><a href=6675.NAVSetupTablePattern2.png><img src=6675.NAVSetupTablePattern2.png alt=" "></a></p>
|
||||
<p><strong>Company-Initialize Codeunit</strong></p>
|
||||
<p>The Company-Initialize codeunit (codeunit 2) is executed when a new company is created. We recommended that you add records to the single-record tables in this codeunit. If some of the fields are expected to have default values, they can also be populated here.</p>
|
||||
|
|
@ -308,12 +307,12 @@ END;
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600600></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600600></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600600></script>
|
||||
<script src=/js/featherlight.min.js?1644600600></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600600></script>
|
||||
<script src=/js/relearn.js?1644600600></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue