Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To create a new summary page, we need to create a single XML file. Based on the business structure, the respective directories should be created. Based on CRM.COM naming conventions, all summary pages are stored in the ../pages/summary/<module_name>/ directory. An SQL or an EJB method at the beginning of the file determines the information that will be retrieved and will be able to be displayed on the summary page. 

 

In this case, we create a directory named ../pages/summary/inventory and then we create a new XML file named warehouses.xml, which uses an SQL statement to retrieve the information.

Code Block
languagexml
titleWarehouses Summary XML Page
firstline1
linenumberstrue
collapsetrue
<summary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/summary.xsd">
	<message>Physical locations where traceable and non-traceable items are stored.</message>
	<title>Warehouses</title>
	<sql>FROM WAREHOUSE
		LEFT JOIN USERS CREATEDBY ON CREATEDBY.USERID = WAREHOUSE.WRHCREATEDBYUSERID
		LEFT JOIN USERS UPDATEDBY ON UPDATEDBY.USERID = WAREHOUSE.WRHLASTUPDBYUSERID
		LEFT JOIN OUUNITS CREATEDBYUNIT ON CREATEDBYUNIT.OUUID = WAREHOUSE.WRHCREATEDBYOUUID
		LEFT JOIN OUUNITS UPDATEDBYUNIT ON UPDATEDBYUNIT.OUUID = WAREHOUSE.WRHUPDATEDBYOUUID
		LEFT JOIN WAREHOUSETYPES ON WAREHOUSETYPES.WRHTYPEID = WAREHOUSE.WRHTYPEID
		LEFT JOIN OUGROUPS ON OUGROUPS.OUGID = WAREHOUSE.OWNEROUGID
		LEFT JOIN PRIVACYLEVELS ON WAREHOUSE.PRIVACYLEVELID = PRIVACYLEVELS.PRIVACYLEVELID
		WHERE WAREHOUSE.WRHDELETED = 0
	</sql>
	<rowsperpage>20</rowsperpage>
	<primaryfield>WAREHOUSE.WRHID</primaryfield>
	<mainlinkfield>WAREHOUSE.WRHNAME</mainlinkfield>
	<orderbyfields>WAREHOUSE.WRHNAME</orderbyfields>
	<allownocriteria>true</allownocriteria>
	<multiselect>true</multiselect>
	<module>INVENTORY_MANAGEMENT</module>
	
	<fieldlist>
		<!-- external filters -->
		 <field>
			<fieldname>WAREHOUSE.WRHID</fieldname>
			<filtertextoption>equal</filtertextoption>
		</field>
 
		...
		<!-- fields -->
		<field>
			<fieldname>WAREHOUSE.WRHNAME</fieldname>
			<caption>Name</caption>
			<summary>true</summary>
			<filter>true</filter>
			<filtercaseinsensitive>true</filtercaseinsensitive>
			<link>page.do?act=itm&amp;xml=inventory/warehouse&amp;jndi=ejb/CRMUIWarehouse&amp;fc=loadForm&amp;pv0=((WAREHOUSE.WRHID))&amp;pvc=1</link>
		</field>
 
		...
 
		<!-- drilldowns -->
		<field>
			<fieldname>BALANCE</fieldname>
			<fieldfunction>''</fieldfunction>
			<caption>Balance</caption>
			<summary>true</summary>
			<available>true</available>
			<fieldtype>label</fieldtype>
			<label>Balance</label>
			<link>drilldown:inventory/warehouse_balance;WRHID~((WAREHOUSETRANSACTIONS.WRHID))</link>
		</field> 
 
		...
 
	</fieldlist>
 
	<actions>
		<action>
			<caption>New</caption>
			<topmenu>true</topmenu>
			<link>page.do?act=new&amp;xml=inventory/warehouse&amp;fc=createButton&amp;pvc=0&amp;jndi=ejb/CRMUIWarehouse</link>
		</action>
 
		...

	</actions>
</summary>
 

 

A warehouse can have multiple balances, and these are displayed as a drilldown in our warehouses.xml file. We then create a new XML file named warehouse_balances.xml, which uses an EJB method to retrieve the information.

Code Block
languagexml
titleWarehouses Balances Summary XML Page
firstline1
linenumberstrue
collapsetrue
<summary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/summary.xsd">
	<title>Warehouse Balances</title>
	<classname>ejb/CRMUIWarehouse</classname>
	<functionname>loadBalancesTab</functionname>
	<rowsperpage>20</rowsperpage>
	<primaryfield>ITEMID</primaryfield>
	<mainlinkfield>ITEMID</mainlinkfield>
	<autosearch>true</autosearch>
	<hidefindbutton>true</hidefindbutton>
	<module>INVENTORY_MANAGEMENT</module>
	
	<fieldlist>
		<!-- external filters -->
		<field>
			<fieldname>WRHID</fieldname>
			<filtertextoption>equal</filtertextoption>
		</field>

		<!-- fields -->
		<field>
			<fieldname>ITEMNAME</fieldname>
			<caption>Product Type</caption>
			<summary>true</summary>
			<available>true</available>
		</field>

		...

		<!-- drilldowns -->
		...

	</fieldlist>
</summary>


 

 

For a full list of summary page attributes, go to User Interface Documentation > Summary Pages