Skip to end of banner
Go to start of banner

Summary XML pages

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Summary XML Pages

Summary 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 criteria.

The user is also able to setup his 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...

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

Creating the Summary Page XML

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 ../pages/summary/modulename directory.

In this case, we create a directory named ../pages/summary/inventory and then we create a new XML file named installedItemTypeSummary.xml as follows.

Installed Item Type Summary Page XML
<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&amp;fc=loadForm&amp;jndi=ejb/CRMUIInstalledItemType&amp;pv0=((INSTALLEDITEMTYPES.InstItemTypeID))&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:

  • No labels