...
1. Data Object Class
The entity's DO class must implement ICRMDOWorkflowRuleEntity interface and its 28 methods:
...
Also if you want 'Applicable on Entity Types' setting to be available <typeentityid> must be defined as well as the corresponding entity.
Ui expand |
---|
title | Audit Trail Workflow Rule Entities |
---|
|
Code Block |
---|
language | xml |
---|
title | entities.xml |
---|
collapse | true |
---|
| <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>
<workflowruleincluded>true</workflowruleincluded>
<typeentityid>CUSTOMRENTALTYPES</typeentityid>
</entity>
<entity>
<id>CUSTOMRENTALTYPES</id>
<name>key_rental_type</name>
<tablename>TRN_RENTALTYPES</tablename>
<classname>com.crm.dataobject.rentals.CUSTOMCRMDORentalType</classname>
<moduleid>CUSTOMRENTALS</moduleid>
<metadatafile>rentaltypes</metadatafile>
</entity>
...
</entities> |
Image Removed Image Added |
3. Fields Metadata file
In fields metadata file, <audittrailexcluded> :
- <workflowruleactionincluded> tag's value must be set to
...
- true for the fields that you want to be available
...
- in 'Update Information' sub-section of 'Actions' section. Keep in mind that <audittrailexcluded> default value is false
...
- . (see Image 1)
- <workflowruleconditionincluded> tag can include any of the following values (separated by comma (,) if more than one is to be defined):
- FIELD_CHANGE: When you want the specific field to be available in 'Conditions' section when the condition type is 'When Specific Field Changes' (see Image 2)
- FIELD_CONTAINS_VALUE: When you want the specific field to be available in 'Conditions' section when the condition type is 'When Specific Field Contains Specific Value' (see Image 3)
- FIELD_FROM_TO_VALUE_CHANGE: When you want the specific field to be available in 'Conditions' section when the condition type is 'When Specific Field Changes From A Specific Value To Another Specific Value' (see Image 4)
Ui expand |
---|
title | Monitored Condition and Action Fields |
---|
|
Code Block |
---|
language | xml |
---|
title | entitiesrentals.xml |
---|
collapse | true |
---|
| <entityfieldconfig>
<mainfield>
<id>custom_number</id>
<name>key_number</name>
<xpath>number</xpath>
<csrexcluded>true<<qlfieldname>rental.number</csrexcluded>qlfieldname>
<plarexcluded>true</plarexcluded>
<acrexcluded>true<<segmentpreviewname>ENTITYNUMBER</acrexcluded>segmentpreviewname>
<audittrailexcluded>true</audittrailexcluded>
</mainfield>
<fields>
<field>
<id>custom_type</id>
<name>key_type</name>
<relatedentityxpath>type</relatedentityxpath>
<xpath>name</xpath>
</field>
<field>
<id>custom_type_alt_account<code</id>
<name>key_type_alt_account<code</name>
<relatedentityxpath>accountReceivable<<relatedentityxpath>type</relatedentityxpath>
<xpath>name<<xpath>altCode</xpath>
</field>
<field>
<id>custom_state<account</id>
<name>key_state<account</name>
<xpath>state<<relatedentityxpath>accountReceivable</xpath>relatedentityxpath>
</field>
<field>
<id>custom_effective_date</id> <workflowruleconditionincluded>FIELD_CHANGE</workflowruleconditionincluded>
<name>key_effective_date</name>
<xpath>effectiveDate<<xpath>name</xpath>
</field>
...
</fields>
<collections>
<collection> <field>
<id>custom_items<state</id>
<name>key_items<state</name>
<relatedentityxpath/>
<xpath>items<<xpath>state</xpath>
<csrexcluded>false</csrexcluded>
<plarexcluded>true</plarexcluded>
<acrexcluded>true</acrexcluded>
<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>serialNumber</xpath>
<audittrailexcluded>true</audittrailexcluded>
</mainfield>
<fields>
<workflowruleconditionincluded>FIELD_CHANGE,FIELD_CONTAINS_VALUE,FIELD_FROM_TO_VALUE_CHANGE</workflowruleconditionincluded>
<workflowruleactionincluded>true</workflowruleactionincluded>
</field>
<field>
<id>custom_code<effective_date</id>
<name>key_producteffective_code<date</name>
<relatedentityxpath>installedItem</relatedentityxpath>
<xpath>product/code</<xpath>effectiveDate</xpath>
<audittrailexcluded>true</audittrailexcluded><workflowruleconditionincluded>FIELD_FROM_TO_VALUE_CHANGE</workflowruleconditionincluded>
</field>
<field>
<id>custom_expiration_type<date</id>
<name>key_productexpiration_type<date</name>
<relatedentityxpath>installedItem</relatedentityxpath>
<xpath>product/type/name<<xpath>expirationDate</xpath>
<audittrailexcluded>true<<workflowruleactionincluded>true</audittrailexcluded>workflowruleactionincluded>
</field>
</fields>
</collection>
</collections>
| Image Removed Image 1 Image Added Image 2 Image Added Image 3 Image Added Image 4 Image Added |
4. Data Entry Page
If you want any fields to be available in
- 'Update Information' sub-section of 'Actions' section and/or
- 'Conditions' section when the condition type is 'When Specific Field Contains Specific Value' and/or
- 'Conditions' section when the condition type is 'When Specific Field Changes From A Specific Value To Another Specific Value'
workflow rule data entry page must be customised in order for the elements responsible for specifying the field value in the above cases to be created.
For more information on customising data entry pages go to Customize Data Entry Pages.