Versions Compared

Key

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

...

The import parameters should be defined in the metadata file to enable the user to give some default values to the respective parameters of the template file. If import parameters are defined, the user will be able to set their values through the import definition data entry page. The import parameters are mapped to the template file's parameters through the <importparametername>, which must be the same as the name of the header of the respective parameter in the template file. So, based on the example below, the template file must have columns with headers custom_parameter1 and custom_parameter2. When defining the import parameters, it is mandatory to define all the information for them. The <importparameterkey> is the label that will appear for the parameter in the data entry page and the <importparametertype> is the type of the parameter and it can be one of the following: java.lang.String, text, java.lang.Integer, java.math.BigDecimal, java.util.Date, password, java.lang.Boolean and enum. If enum is defined as the type, then an additional tag must be defined, the <importparameterclassname>, which indicates the class of the import parameter.

...

  1. Define the export process in the exports.xml metadata file.
    1. Define export criteria.
  2. Create a process class extending com.crm.process.CRMExportBean, responsible for creating the export file.

...

The export process must be defined in the exports.xml metadata file, as shown in the example below. The metadata file can be located under the <custom_project>/src/main/resources/metadatadirectory. Note that all of the information except exportdescription and exportcriteria must be defined in the file. The processes defined in this file will appear in the Exports page, under Foundation > Utilities and you can view their process run logs and submit them through this page.

...

languagejava
themeEclipse
titleexports.xml
collapsetrue

...

a. Export Criteria

The export criteria should be defined in the metadata file to enable the user to use some criteria that the entities that will be exported must meet. If export criteria are defined in the metadata file, these criteria will appear on the export's data entry page and the user will be able to define values for that criteria. When defining the export criteria, it is mandatory to define all the information for them. The <exportcriterionname> is the criterion name, the <exportcriterionkey> is the label that will appear for the criterion in the data entry page and the <exportcriteriontype> is the type of the criterion and it can be one of the following: java.lang.String, text, java.lang.Integer, java.math.BigDecimal, java.util.Date, password, java.lang.Boolean and enum. If enum is defined as the type, then an additional tag must be defined, the <exportcriterionclassname>, which indicates the class of the export criterion.

Code Block
languagejava
themeEclipse
titleexports.xml
collapsetrue
<exportsconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/exports.xsd">
	<exports>
		...

		<export>
			<exportname>Custom Export</exportname>
			<exportdescription>Custom Export in CRM.COM.</exportdescription>
			<exportprocess>CUSTOM_EXPORT</exportprocess>
			<exportmodule>CUSTOM</exportmodule>
			<exportcriteria>
				<exportcriterion>
					<exportcriterionname>custom_criterion1</exportcriterionname>
					<exportcriterionkey>key_custom_criterion1</exportcriterionkey>
					<exportcriteriontype>java.lang.String</exportcriteriontype>
				</exportcriterion>
				<exportcriterion>
					<exportcriterionname>custom_criterion2</exportcriterionname>
					<exportcriterionkey>key_custom_criterion2</exportcriterionkey>
					<exportcriteriontype>enum</exportcriteriontype>
					<exportcriterionclassname>com.crm.dataobject.contactinfo.AddressTypes</exportcriterionclassname>
				</exportcriterion>
				...
			</exportcriteria>
		</export>

		...
	</exports>
</exportsconfig>

...