This section describes how an explicit viewing access entity can be created
What does this section cover?
Create an Explicit Viewing Access Entity
Entities with explicit viewing access are the entities which hold information about who owns a record, and they can be viewed only by users belonging explicitly to that Group.
In order for an entity to be considered explicit, it has to meet the following conditions:
1. Data Object Class
The entity's DO class must:
- Implement ICRMDOExplicitAccessibleEntity interface and its following methods:
- getOwnedByGrou()
- getPrivacyLevel()
- setOwnedByGroup(CRMDOUnitGroup unitGroup)
- setPrivacyLevel(CRMDOPrivacyLevel privacyLevel)
- getType()
Note that:
- Owned by Group is a mandatory field which dictates which Group owns that entity record, i.e. which Group can view, modify and assign that record by default, without the need of having collaboration access rights.
- Privacy Level: The privacy level that dictates the collaboration level of that entity record. Privacy Levels are read-only, as they are set automatically by the system. A dedicated action can be used to change the privacy level. If a privacy level is not specified, then that record is visible to all communities and all groups and on the screen or through Web API calls is displayed as “Applicable to all by default”
public class CUSTOMCRMDORental extends CRMDO implements ICRMDOExplicitAccessibleEntity {
private CUSTOMCRMDORentalType type;
private CUSTOMRentalState state;
private CRMDOAccountReceivable accountReceivable;
private Date effectiveDate;
private Date expirationDate;
private CRMDOUnitGroup ownedByGroup;
private CRMDOPrivacyLevel privacyLevel;
private Set<CUSTOMCRMDORentalItem> items;
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 CRMDOPrivacyLevel getPrivacyLevel() {
return privacyLevel;
}
public void setPrivacyLevel(CRMDOPrivacyLevel privacyLevel) {
setChange("privacyLevel", this.privacyLevel, privacyLevel);
this.privacyLevel = privacyLevel;
}
public CUSTOMCRMDORentalType getType() {
return type;
}
public void setType(CUSTOMCRMDORentalType type) {
setChange("type", this.type, type);
this.type = type;
}
public CRMDOUnitGroup getOwnedByGroup() {
return ownedByGroup;
}
public void setOwnedByGroup(CRMDOUnitGroup ownedByGroup) {
setChange("ownedByGroup", this.ownedByGroup, ownedByGroup);
this.ownedByGroup = ownedByGroup;
}
}