Versions Compared

Key

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

...

Ui expand
titleSegment Entities
Code Block
languagexml
titleentities.xml
collapsetrue
<entities>
	<entity>
		<id>CUSTOMRENTALS</id>
		<name>key_rental</name>
		<tablename>TRN_RENTALS</tablename>
		<classname>com.crm.dataobject.rentals.CUSTOMCRMDORental</classname>
		<moduleid>CUSTOM_RENTALS</moduleid>
		<metadatafile>rentals</metadatafile>
		<segmentincluded>true</segmentincluded>
	</entity>
	...
</entities>

2. Fields Metadata

...

File

In fields metadata file:

  1.  <qlfieldname> tag's value is the CRMQL field name and must be defined for the fields that you want to be available as segment criteria.
  2. <segmentpreviewname> tag's value must be defined for the fields that you want  to be displayed when previewing a segment. Valid values are ENTITYNUMBER, ENTITYNAME, ENTITYALTCODE, ENTITYDESC and are used when you want the field to be displayed as the entity's number, name, alternative code or description accordingly.
Ui expand
titleSegment Fields
Code Block
languagexml
titleentitiesrentals.xml
collapsetrue
<entityfieldconfig>
	<<mainfield>
		<id>custom_number</id>
		<name>key_number</name>
		<xpath>number</xpath>
		<qlfieldname>rental.number</qlfieldname>
		<segmentpreviewname>ENTITYNUMBER</segmentpreviewname>
	</mainfield>
	<fields>
		<field>
			<id>custom_type</id>
			<name>key_type</name>
			<relatedentityxpath>type</relatedentityxpath>
			<xpath>name</xpath>
			<qlfieldname>rental.type.name</qlfieldname>
		</field>
		<field>
			<id>custom_type_alt_code</id>
			<name>key_type_alt_code</name>
			<relatedentityxpath>type</relatedentityxpath>
			<xpath>altCode</xpath>
			<csrexcluded>true</csrexcluded>
			<plarexcluded>true</plarexcluded>
			<acrexcluded>true</acrexcluded>
			<audittrailexcluded>true</audittrailexcluded>
			<qlfieldname>rental.type.alternative_code</qlfieldname>
		</field>
		<field>
			<id>custom_account</id>
			<name>key_account</name>
			<relatedentityxpath>accountReceivable</relatedentityxpath>
			<xpath>name</xpath>
			<qlfieldname>rental.accounts_receivable.name</qlfieldname>
		</field>
		<field>
			<id>custom_state</id>
			<name>key_state</name>
			<xpath>state</xpath>
			<qlfieldname>rental.state</qlfieldname>
		</field>
		<field>
			<id>custom_effective_date</id>
			<name>key_effective_date</name>
			<xpath>effectiveDate</xpath>
			<qlfieldname>rental.effective_date</qlfieldname>
		</field>
		<field>
			<id>custom_expiration_date</id>
			<name>key_expiration_date</name>
			<xpath>expirationDate</xpath>
			<qlfieldname>rental.expiration_date</qlfieldname>
		</field>
		
		<field>
			<id>custom_notes</id>
			<name>key_notes</name>
			<xpath>sharedNotes</xpath>
		</field>
		
		<field>
			<id>custom_createdByUser</id>
			<name>key_created_by_user</name>
			<relatedentityxpath>createdByUser</relatedentityxpath>
			<xpath>username</xpath>
			<audittrailexcluded>true</audittrailexcluded>
		</field>
		<field>
			<id>custom_updatedByUser</id>
			<name>key_updated_by_user</name>
			<relatedentityxpath>updatedByUser</relatedentityxpath>
			<xpath>username</xpath>
			<audittrailexcluded>true</audittrailexcluded>
		</field>
		<field>
			<id>custom_createdByUnit</id>
			<name>key_created_by_unit</name>
			<relatedentityxpath>createdByUnit</relatedentityxpath>
			<xpath>name</xpath>
			<audittrailexcluded>true</audittrailexcluded>
		</field>
		<field>
			<id>custom_updatedByUnit</id>
			<name>key_updated_by_unit</name>
			<relatedentityxpath>updatedByUnit</relatedentityxpath>
			<xpath>name</xpath>
			<audittrailexcluded>true</audittrailexcluded>
		</field>
		<field>
			<id>custom_createdDate</id>
			<name>key_created_date</name>
			<xpath>createdDate</xpath>
			<audittrailexcluded>true</audittrailexcluded>
		</field>
		<field>
			<id>custom_updatedDate</id>
			<name>key_updated_date</name>
			<xpath>updatedDate</xpath>
			<audittrailexcluded>true</audittrailexcluded>
		</field>
	</fields>
		
	<collections>
		<collection>
			<id>custom_items</id>
			<name>key_items</name>
			<relatedentityxpath/>
			<xpath>items</xpath>
			<qlfieldname>rental.items</qlfieldname>
			<method>
				<ejbname>CUSTOMCRMUIRental</ejbname>
				<methodname>loadItemsTab</methodname>
				<parameters>
					<parameter>
						<xpath>[DTO]</xpath>
					</parameter>
				</parameters>
			</method>
			<mainfield>
				<id>custom_serialNumber</id>
				<name>key_serialNumber</name>
				<relatedentityxpath>installedItem</relatedentityxpath>
				<xpath>altCode</xpath>
				<qlfieldname>rental.items.serial_number</qlfieldname>
			</mainfield>
			<fields>
				<field>
					<id>custom_code</id>
					<name>key_product_code</name>
					<relatedentityxpath>installedItem</relatedentityxpath>
					<xpath>product/code</xpath>
					<qlfieldname>rental.items.product_code</qlfieldname>
				</field>
				<field>
					<id>custom_type</id>
					<name>key_product_type</name>
					<relatedentityxpath>installedItem</relatedentityxpath>
					<xpath>product/type/name</xpath>
					<qlfieldname>rental.items.product_type</qlfieldname>
				</field>
			</fields>
		</collection>
	</collections>
</entityfieldconfig>