Versions Compared

Key

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

Summary XML Pages

Summary XML pages are used to display multiple records in a tabular form. They give the ability to the user to search for a specific record in the database by specifying a set of  A summary screen displays multiple records based on search criteria.

Image RemovedSummary XML pageImage Added

The user is also able to setup his can change the look of the summary page by specifying a number of other parameters such as the fields that are displayed on the summary page, how the records are ordered, which filters are visible , etc...

Image Removed

In this tutorial, we are going to create a summary page that lists Installed Item Types.

...

adding or removing fields from the filter of summary list, changing the order of the results, etc. This is done by clicking on the Preferences link just above the summary page results tab.

Summary XML page preferencesImage Added

Creating the Summary XML Page

To create a new summary page, we need to create a single .xml file that will define our summary page.

Before proceeding with the creation of the summary page, it is required that you read the summary page documentation found here.

The first thing to do is to create a .xml file located in 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/modulename directory.<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 installedItemTypeSummarywarehouses.xml as follows.

Image Removed

Code Block
languagexml
titleInstalled Item Type Warehouses Summary XML Page XML
firstline1
linenumberstrue
collapsetrue
<summary>
    <title>Installed Item Types</title>
     <sql>FROM INSTALLEDITEMTYPES
         LEFT OUTER JOIN PRODUCTS ON PRODUCTS.ProdID=INSTALLEDITEMTYPES.ProdID
         LEFT OUTER JOIN PRODUCTTYPES ON PRODUCTTYPES.ProdTypeID=INSTALLEDITEMTYPES.ProdTypeID 
         LEFT OUTER JOIN USERS CREATEDBY ON CREATEDBY.UserID=INSTALLEDITEMTYPES.InstItemTypeCreatedByUserID
        LEFT OUTER JOIN USERS UPDATEDBY ON UPDATEDBY.UserID=INSTALLEDITEMTYPES.InstItemTypeUpdatedByUserID 
        WHERE INSTALLEDITEMTYPES.INSTITEMTYPEDELETED=0
    </sql>
    <rowsperpage>100</rowsperpage>
    <primaryfield>INSTALLEDITEMTYPES.InstItemTypeID</primaryfield>
    <mainlinkfield>INSTALLEDITEMTYPES.InstItemTypeID</mainlinkfield>
    <groupby></groupby>
    <autosearch>true</autosearch>
    <hidefindbutton>false</hidefindbutton>
    <multiselect>false</multiselect>
    <userviewfilter></userviewfilter>
    
    <fieldlist>
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeName</fieldname>
            <caption>Name</caption>
            <summary>true</summary>
            <filter>true</filter>
            <fieldtype>string</fieldtype>
            <link>page.do?xml=inventory/installedItemTypeDetailBody&amp;act=itm<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;jndi=ejb/CRMUIInstalledItemType&amp;pv0=((INSTALLEDITEMTYPESWAREHOUSE.InstItemTypeIDWRHID))&amp;pvc=1</link>
        		</field>
        
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeAltCode</fieldname>
            <caption>Alternative Code</caption>
            <summary>true</summary>
            <filter>true</filter>
            <mouseover>false</mouseover>
            <expand>false</expand>
        </field>
        
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeDesc</fieldname>
            <caption>Description</caption>
            <summary>true</summary>
            <filter>false</filter>
            <mouseover>false</mouseover>
            <expand>false</expand>
        </field>
        
        <field>
            <fieldname>IsDefault</fieldname>
            <fieldfunction>INSTALLEDITEMTYPES.InstItemTypeDefault</fieldfunction>
            <caption>Is Default</caption>
            <fixedlookup>ejb/CRMUIInstalledItemType.getYesNoSelectBox</fixedlookup>
            <filter>true</filter>
            <filteronexpand>true</filteronexpand>
        </field>
        
        <field>
            <fieldname>IsTraceable</fieldname>
            <fieldfunction>INSTALLEDITEMTYPES.InstItemTypeIsTraceable</fieldfunction>
            <caption>Is Traceable</caption>
            <fixedlookup>ejb/CRMUIInstalledItemType.getYesNoSelectBox</fixedlookup>
            <filter>true</filter>
        </field>
        
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeDefault</fieldname>
            <caption>Is Default</caption>
            <fixedlookup>ejb/CRMUIInstalledItemType.getYesNoLookup</fixedlookup>
            <summary>true</summary>
        </field>
        
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeIsTraceable</fieldname>
            <caption>Is Traceable</caption>
            <fixedlookup>ejb/CRMUIInstalledItemType.getYesNoLookup</fixedlookup>
            <summary>true</summary>
        </field>
           <field>
               <fieldname>PRODUCTS.ProdID</fieldname>
               <caption>Product</caption>
            <filter>true</filter>
            <filteronexpand>true</filteronexpand>
            <filterlookupname>dataset;products.getproducts;prodid;prodnum</filterlookupname>
            <summary>false</summary>
           </field>
           
            <field>
               <fieldname>PRODUCTTYPES.ProdTypeID</fieldname>
               <caption>Product Type</caption>
            <filter>true</filter>
            <filteronexpand>true</filteronexpand>
            <filterlookupname>dataset;products.getproducttypes;prodtypeid;prodtypename</filterlookupname>
            <summary>false</summary>
           </field>
        <field>
            <fieldname>PRODUCTS.ProdNum</fieldname>
               <caption>Product No.</caption>
               <summary>true</summary>
               <expand>false</expand>    
           </field>
           
           <field>
            <fieldname>PRODUCTTYPES.ProdTypeName</fieldname>
               <caption>Product Type Name</caption>
               <summary>true</summary>
               <expand>false</expand>    
           </field>   
        <field>
            <fieldname>CREATEDBY.USERNAME</fieldname>
            <caption>Created by</caption>
            <summary>false</summary>
            <available>true</available>
            <expand>true</expand>
        </field>
        
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeCreatedDate</fieldname>
            <caption>Created on</caption>
            <fieldtype>date</fieldtype>
            <summary>false</summary>
            <expand>true</expand>
        </field>
        
        <field>
            <fieldname>UPDATEDBY.USERNAME</fieldname>
            <caption>Updated by</caption>
            <summary>false</summary>
            <available>true</available>
            <expand>true</expand>
        </field>
        <field>
            <fieldname>INSTALLEDITEMTYPES.InstItemTypeUpdatedDate</fieldname>
            <caption>Updated on</caption>
            <fieldtype>date</fieldtype>
            <summary>false</summary>
            <expand>true</expand>
        </field>
        
        <field>
               <fieldname>CREATEDBY.USERID</fieldname>
               <caption>Created By</caption>
            <filter>true</filter>
            <filteronexpand>true</filteronexpand>
            <filterlookupname>dataset;businessnetwork.searchusers;userid;userpersonname</filterlookupname>
            <summary>false</summary>
           </field>
           
           <field>
               <fieldname>UPDATEDBY.USERID</fieldname>
               <caption>Updated By</caption>
            <filteravailable>true</filteravailable>
            <filterlookupname>dataset;businessnetwork.searchusers;userid;userpersonname</filterlookupname>
            <summary>false</summary>
           </field>
    </fieldlist>
    
    <actions>
        <action>
            <caption>New</caption>
            <link>page.do?xml=inventory/installedItemTypeDetailBody&amp;act=new&amp;fc=createButton&amp;jndi=ejb/CRMUIInstalledItemType</link>
            <topmenu>true</topmenu>
        </action>
        <action>
            <caption>Set Default</caption>
            <link>javascript:displayModalCreate('inventory/setDefaultTypeDetailBody','ejb/CRMUIInstalledItemType','loadDefaultForm',null,'new',null,'','')</link>
        </action>
    </actions>
</summary>

As you can see, we define part of the SQL and all the fields and actions that we want our summary page to have. CRM.COM software will process this XML and construct the complete SQL, execute it and return the results on the screen.

To access the summary page, we use the following URL:

Info
titleSummary page URL
http://localhost:9080/crm/page.do?act=summary&xml=inventory/installedItemTypeSummary
 
		...
 
		<!-- 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>
 

 

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