Panel | ||
---|---|---|
| ||
This section describes how a conditional security restriction entity can be created What does this section cover?
|
Create a Conditional Security Restriction Entity
In order for an entity to be available to Conditional Security Restrictions Mechanism, it has to meet the following conditions:
1. Data Object
The entity's DO class must implement ICRMDOCSREntity interface and its four methods:
- getAssignedToUnit()
- getAssignedToUser()
- getPrivacyLevel()
- getStatus()
Note that these methods should return null if your data object has no status, privacy level, assigned to user, or assigned to unit values.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public class CUSTOMCRMDORental extends CRMDO implements ICRMDOCSREntity{
private CUSTOMCRMDORentalType type;
private CUSTOMRentalState state;
private CRMDOAccountReceivable accountReceivable;
private Date effectiveDate;
private Date expirationDate;
private Set<CUSTOMCRMDORentalItem> items;
public CUSTOMCRMDORentalType getType() {
return type;
}
public void setType(CUSTOMCRMDORentalType type) {
setChange("type", this.type, type);
this.type = type;
}
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;
}
@Override
public Object getStatus() {
return null;
}
@Override
public Object getState() {
return null;
}
@Override
public CRMDOUnit getAssignedToUnit() {
return null;
}
@Override
public CRMDOUser getAssignedToUser() {
return null;
}
}
|
2. Entities Metadata File
In entities metadata file, <csrexcluded> tag's value must be set to false. Keep in mind that <csrexcluded> default value is false, so in such cases, it can be omitted.
Ui expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
3. Fields Metadata file
In fields metadata file, <csrexcluded> tag's value must be set to false for the fields that you want to be available for monitoring. Keep in mind that <csrexcluded> default value is false, so in such cases, it can be omitted.
Ui expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
4. Modules Metadata File
In modules metadata file, define all the processes, common and additional, and printouts you want to be available for conditional security restriction under any feature of your entity's module.
Ui expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|