<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=How_to_create_a_navigation_rule</id>
	<title>How to create a navigation rule - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=How_to_create_a_navigation_rule"/>
	<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=How_to_create_a_navigation_rule&amp;action=history"/>
	<updated>2026-04-06T16:57:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.infinite-erp.co.id/index.php?title=How_to_create_a_navigation_rule&amp;diff=1057&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;== Introduction ==   This document describes how to create a navigation rule.  {{(!)| This functionality is available since Openbravo 3.0PR15Q4}}  == Navigation Model ==  The...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=How_to_create_a_navigation_rule&amp;diff=1057&amp;oldid=prev"/>
		<updated>2018-10-29T04:37:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Introduction ==   This document describes how to create a navigation rule.  {{(!)| This functionality is available since Openbravo 3.0PR15Q4}}  == Navigation Model ==  The...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction == &lt;br /&gt;
&lt;br /&gt;
This document describes how to create a navigation rule.&lt;br /&gt;
&lt;br /&gt;
{{(!)| This functionality is available since Openbravo 3.0PR15Q4}}&lt;br /&gt;
&lt;br /&gt;
== Navigation Model ==&lt;br /&gt;
&lt;br /&gt;
The navigation model is explained deeply in the following document:&lt;br /&gt;
[[Navigation_Model_Documentation | Navigation Model Documentation]]&lt;br /&gt;
&lt;br /&gt;
== Rules definition at field level ==&lt;br /&gt;
&lt;br /&gt;
These rules are defined in the ''Navigation Rules'' tab of the ''Windows, Tabs and Fields'' window, below the ''Field'' tab.&lt;br /&gt;
&lt;br /&gt;
System administrator can add rules to a field in order to make it navigate to a custom tab.&lt;br /&gt;
&lt;br /&gt;
[[File:Navmodel1.png | 800px]]&lt;br /&gt;
&lt;br /&gt;
Main fields that have to be set are:&lt;br /&gt;
&lt;br /&gt;
;'''Sequence Number''': Priority of the rule. The rules are applied in ascending order.&lt;br /&gt;
;'''Tab''': Destination tab that will be opened if the rule is met.&lt;br /&gt;
;'''Direct Navigation''': Flag that determines whether the ''HQL Logic'' clause is executed or if the rule is always applied.&lt;br /&gt;
;'''HQL Logic''': HQL where clause that the record being opened has to meet in order to open the specified tab of the rule.&lt;br /&gt;
&lt;br /&gt;
== Rules definition at table level ==&lt;br /&gt;
&lt;br /&gt;
The rules at table level for the Extended Navigation Model are defined in a new tab of the ''Tables and Columns'' window called ''Navigation Rules''&lt;br /&gt;
&lt;br /&gt;
System administrator can add new rules to a table in order to make the links which have that table as a reference navigate to a custom tab.&lt;br /&gt;
&lt;br /&gt;
[[File:Navmodel2.png | 800px]]&lt;br /&gt;
&lt;br /&gt;
The rules are defined following the same logic than Field Level Rules.&lt;br /&gt;
&lt;br /&gt;
== Creating Rules ==&lt;br /&gt;
&lt;br /&gt;
To create a rule that it is not of ''Direct Navigation'' you have to define the ''HQL Logic'' field with a where clause expression. This expression is appended to a HQL that it is executed on the table where the record that it is being opened is stored. The HQL is also filtered by the ''id'' of the record so it can only return that record. If the HQL returns the record then the rule is valid and it is opened on its ''tab''. If no results are returned it is executed the next rule.&lt;br /&gt;
&lt;br /&gt;
The ''HQL Logic'' has to be a valid HQL where clause. The alias of the main table is '''e''', using it it is possible to access the properties of that table.&lt;br /&gt;
&lt;br /&gt;
For example the ''C_OrderLine'' table has different Order types that are managed on different windows. Sales orders that are not return orders have to be opened in the ''Sales Order'' window. It is needed to create a rule with an HQL Logic that returns the order line only in case it is a Sales Order and it is not a Return. The HQL Logic looks like:&lt;br /&gt;
&lt;br /&gt;
 e.salesOrder.salesTransaction=true AND e.salesOrder.documentType.return=false&lt;br /&gt;
&lt;br /&gt;
You can check in the Application Dictionary how this rule is created and how there are other rules for purchase and/or return orders.&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>