...
The entity's DO class must implement ICRMDOWorkflowRuleEntity interface and its two methods: getAuditTrailLogs() and setAuditTrailLogs(Set<CRMDO> auditTrailLogs). Keep in mind that auditTrailLogs set is defined in superclass CRMDO.28 methods:
- setUserField1(String userField1)
- setUserField2(String userField2)
- setUserField3(String userField3)
- setUserField4(String userField4)
- setUserField5(String userField5)
- setUserField6(String userField6)
- setUserField7(String userField7)
- setUserField8(String userField8)
- setDateTime1(Date dateTime1)
- setDateTime2(Date dateTime2)
- setDateTime3(Date dateTime3)
- setDateTime4(Date dateTime4)
- setFloat1(BigDecimal float1)
- setFloat2(BigDecimal float2)
- setFloat3(BigDecimal float3)
- setFloat4(BigDecimal float4)
- setStatusTransitionExceptionEnabled(Integer statusTransitionExceptionEnabled)
- getStatusTransitionExceptionEnabled()
- isStatusTransitionExceptionEnabled()
- setACRExceptionEnabled(Integer acrExceptionEnabled)
- getACRExceptionEnabled()
- isACRExceptionEnabled()
- setPLARExceptionEnabled(Integer plarExceptionEnabled)
- getPLARExceptionEnabled()
- isPLARExceptionEnabled()
- setOwnedByGroupExceptionEnabled(Integer ownedByGroupExceptionEnabled)
- getOwnedByGroupExceptionEnabled()
- isOwnedByGroupExceptionEnabled()
Note that for any of 1-16 methods there is no corresponding database field, no functionality should be implemented.
In order to implement methods 17-28 the following java transient fields should be declared:
- Integer statusTransitionExceptionEnabled
- Integer acrExceptionEnabled
- Integer plarExceptionEnabled
- Integer ownedByGroupExceptionEnabled
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
publicppublic class CUSTOMCRMDORental extends CRMDO implements ICRMDOAuditTrailedEntity ICRMDOWorkflowRuleEntity{ private CUSTOMCRMDORentalType type; private CUSTOMRentalState state; private CRMDOAccountReceivable accountReceivable; private Date effectiveDate; private Date expirationDate; private Set<CUSTOMCRMDORentalItem> items; public CUSTOMCRMDORentalType getType() { return type //transient fields private Integer statusTransitionExceptionEnabled; }private public void setType(CUSTOMCRMDORentalType type) { setChange("type", this.type, type); this.type = type; } Integer acrExceptionEnabled; private Integer plarExceptionEnabled; private Integer ownedByGroupExceptionEnabled; public CUSTOMRentalState getState() { return state; } public void setState(CUSTOMRentalState state) { setChange("state", this.state, state); this.state = state; } public CRMDOAccountReceivable getAccountReceivable() { return accountReceivable; } public void setAccountReceivable(CRMDOAccountReceivable accountReceivable) { setChange("accountReceivable", this.accountReceivable, accountReceivable); this.accountReceivable = accountReceivable; } public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { setChange("effectiveDate", this.effectiveDate, effectiveDate); this.effectiveDate = effectiveDate; } public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { setChange("expirationDate", this.expirationDate, expirationDate); this.expirationDate = expirationDate; } public Set<CUSTOMCRMDORentalItem> getItems() { return items; } public void setItems(Set<CUSTOMCRMDORentalItem> items) { setChange("items", this.items, items); this.items = items; } public CUSTOMCRMDORentalType getType() { return type; } public void setType(CUSTOMCRMDORentalType type) { setChange("type", this.type, type); this.type = type; } @Override public void setUserField1(String userField1) { // TODO Auto-generated method stub } @Override public void setUserField2(String userField2) { // TODO Auto-generated method stub } @Override public void setUserField3(String userField3) { // TODO Auto-generated method stub } @Override public void setUserField4(String userField4) { // TODO Auto-generated method stub } @Override public void setUserField5(String userField5) { // TODO Auto-generated method stub } @Override public void setUserField6(String userField6) { // TODO Auto-generated method stub } @Override public void setUserField7(String userField7) { // TODO Auto-generated method stub } @Override public void setUserField8(String userField8) { // TODO Auto-generated method stub } @Override public void setDateTime1(Date dateTime1) { // TODO Auto-generated method stub } @Override public void setDateTime2(Date dateTime2) { // TODO Auto-generated method stub } @Override public void setDateTime3(Date dateTime3) { // TODO Auto-generated method stub } @Override public void setDateTime4(Date dateTime4) { // TODO Auto-generated method stub } @Override public void setFloat1(BigDecimal float1) { // TODO Auto-generated method stub } @Override public void setFloat2(BigDecimal float2) { // TODO Auto-generated method stub } @Override public void setFloat3(BigDecimal float3) { // TODO Auto-generated method stub } @Override public void setFloat4(BigDecimal float4) { // TODO Auto-generated method stub } @Override public void setStatusTransitionExceptionEnabled(Integer statusTransitionExceptionEnabled) { this.statusTransitionExceptionEnabled = statusTransitionExceptionEnabled; } @Override public Integer getStatusTransitionExceptionEnabled() { return this.statusTransitionExceptionEnabled; } @Override public Set<CRMDO> getAuditTrailLogs() throws Exception Boolean isStatusTransitionExceptionEnabled() { return ((this.statusTransitionExceptionEnabled!=null && this.statusTransitionExceptionEnabled.equals(new Integer(1))) ? true : false); } @Override public void setACRExceptionEnabled(Integer acrExceptionEnabled) { this.acrExceptionEnabled = acrExceptionEnabled; } @Override public Integer getACRExceptionEnabled() { return this.acrExceptionEnabled; } @Override public Boolean isACRExceptionEnabled() { return auditTrailLogs((this.acrExceptionEnabled!=null && this.acrExceptionEnabled.equals(new Integer(1))) ? true : false); } @Override public void setAuditTrailLogssetPLARExceptionEnabled(Set<CRMDO>Integer auditTrailLogs) throws ExceptionplarExceptionEnabled) { this.plarExceptionEnabled = plarExceptionEnabled; } @Override public Integer getPLARExceptionEnabled() { this.auditTrailLogs=auditTrailLogs; } } return this.plarExceptionEnabled; } @Override public Boolean isPLARExceptionEnabled() { return ((this.plarExceptionEnabled!=null && this.plarExceptionEnabled.equals(new Integer(1))) ? true : false); } @Override public void setOwnedByGroupExceptionEnabled(Integer ownedByGroupExceptionEnabled) { this.ownedByGroupExceptionEnabled = ownedByGroupExceptionEnabled; } @Override public Integer getOwnedByGroupExceptionEnabled() { return this.ownedByGroupExceptionEnabled; } @Override public Boolean isOwnedByGroupExceptionEnabled() { return ((this.ownedByGroupExceptionEnabled!=null && this.ownedByGroupExceptionEnabled.equals(new Integer(1))) ? true : false); } } |
2. Entities Metadata File
In entities metadata file, <audittrailexcluded> <workflowruleincluded> tag's value must be set to falsetrue. Keep in mind that <audittrailexcluded> <workflowruleincluded> default value is false, so in such cases, it can be omitted.
Also if you want 'Applicable on Entity Types' setting to be available <entitytypeid> must be defined as well as the corresponding entity.
Ui expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
...
Ui expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|