Customize Entities Metadata

Entities metadata file is used to define the entities of the system along with their properties and characteristics.

 

What does this section cover?

Entities File

All custom entities are declared in entities.xml file, which must be created under <custom_project>/web/WebContent/metadata directory.

Define Custom Entities

To define a new custom entity you have to use a unique entity id starting with CUSTOM and define its name, table name, class name and any other property or characteristic needed.

In the following example, a new custom entity is defined

entities.xml
<entityconfig>
	<entities>
		<entity>
			<id>CUSTOMSMSMESSAGES</id>
			<name>key_sms_message</name>
			<description/>
			<tablename>CUSTOMSMSMESSAGES</tablename>
			<classname>com.crm.dataobject.messages.COMPANYCRMDOSmsMessage</classname>
			<typeentityid>CUSTOMSMSTYPES</typeentityid>
			<statusentityid>CUSTOMSMSSTATUSES</statusentityid>
			<stateentityid>CUSTOMSMSSTATES</stateentityid>
			<categoryentityid>CUSTOMSMSCATEGORIES</categoryentityid>
			<moduleid>SERVICE_REQUESTS</moduleid>
			<metadatafile>smsmessages</metadatafile>
		</entity>
	</entities>
</entityconfig>

 

For a full list of metadata messages attributes, go to Entities Metadata.