...
In order for an entity to be available to Controlled Selection Access Mechanism, it has to meet the following conditions:
1. Data Object Class
The entity's DO class must:
- Implement ICRMDOControlledSelectableEntity interface and its two methods:
- getOrganisationalUnits()
- setOrganisationalUnits(Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits)
- Define organisationalUnits set.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public class CUSTOMCRMDORentalType extends CRMDO implements ICRMDOControlledSelectableEntity { private Date effectiveDate; private Date expirationDate; private Set<CUSTOMCRMDORentalTypeProduct> allowedProducts; private Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits; 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<CUSTOMCRMDORentalTypeProduct> getAllowedProducts() { return allowedProducts; } public void setAllowedProducts(Set<CUSTOMCRMDORentalTypeProduct> allowedProducts) { setChange("allowedProducts", this.allowedProducts, allowedProducts); this.allowedProducts = allowedProducts; } @Override public Set<CRMDOControlSelectOrganisationalUnit> getOrganisationalUnits() { return organisationalUnits; } @Override public void setOrganisationalUnits(Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits) { setChange("organisationalUnits", this.organisationalUnits, organisationalUnits); this.organisationalUnits = organisationalUnits; } } |
2. Data Entry Page
- <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.
- <typeentityid>, <statusentityid> and <stateentityid> tags must be defined whenever a type, status and/or state entity exist.
...
title | Restricted Entities |
---|
...
a. Definition File
Data entry page definition file must include a component with a single drilldown element having tabAllowedUnits as its <tabid>. tabAllowedUnits is the tabid of the generic component that will be used in this case.
Code Block | ||||
---|---|---|---|---|
| ||||
<entities>
<entity>
<id>CUSTOMRENTALS</id>
<name>key_rental</name>
<description/>
<tablename>TRN_RENTALS</tablename>
<classname>com. crm. dataobject. rentals.CUSTOMCRMDORental</classname>
<typeentityid>CUSTOMRENTALTYPES</typeentityid>
<stateentityid>CUSTOMRENTALSTATES</stateentityid>
<moduleid>CUSTOM_RENTALS</moduleid>
<metadatafile>rentals</metadatafile>
<csrexcluded>false</csrexcluded>
</entity>
<entity>
<id>CUSTOMRENTALSTATES</id>
<name>key_rental_state</name>
<classname>com.crm.dataobject.rentals.CUSTOMRentalState</classname>
<moduleid>CUSTOM_RENTALS</moduleid>
<csrexcluded>true</csrexcluded>
</entity>
<entity>
<id>CUSTOMRENTALTYPES</<main> ... <component> <id>cmpAllowedOrganisationalUnitsDrilldown</id> <name>key_rental_type</name> <tablename>TRN_RENTALTYPES</tablename> <classname>com.crm.dataobject.rentals.CUSTOMCRMDORentalType</classname> <moduleid>CUSTOMRENTALS</moduleid> <metadatafile>rentaltypes</metadatafile> <csrexcluded>true</csrexcluded> </entity> ... </entities>
Type, Status and Life Cycle State options are built based on the values of type, status and state entities defined by <typeentityid>, <statusentityid> and <stateentityid> tags |
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | | |||||
|
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 | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
</elements>
</component>
...
</main>
... |
b. Layout File
Data entry page layout file must include:
- The component defined in data entry definition page including the allowed organisational units drilldown element.
- The allowed organisational units tab definition in the details section, which is implemented as a generic component.
Code Block | ||||
---|---|---|---|---|
| ||||
<page>
...
<sections>
...
<section>
<id>secAllowedProducts</id>
<name>key_allowed_products</name>
<disable>false</disable>
<left>
<components>
<component><id>cmpAllowedProductsDrilldown</id></component>
</components>
</left>
</section>
...
</sections>
<details>
<tabs>
<tab>
<id>file:networkmanagement/allowedOrgUnits.xml</id>
<disable>true</disable>
<preload>true</preload>
<showheader>false</showheader>
<components>
<component><id>cmpSelect</id></component>
<component><id>cmpCommunity</id></component>
<component><id>cmpGroup</id></component>
<component><id>cmpUnit</id></component>
</components>
</tab>
...
</tabs>
</details>
</page> |