Automatic setup of Email addresses
The example method was used in the definition of the FACULTY_01 phase and looks as follows:
with the content of this definition as follows:
The method definition defines the fields visible above:
Type of source
possible one of the following types:
Object element
Indicates that the data source type is an element (field) of some object (record).
For example, it could be a field containing the email address from the indicated compound field (e.g., project manager) of the current record object
User access level
Indicates that the data source type is the access level of the current user.
Addresses will be determined by the current user's access level editors.
For example, if the current user has permissions at the level of the Institute of Computer Science, the addresses of all editors authorized to handle projects at the level of this Institute will be included.
User affiliation
Indicates that the type of data source is the affiliation of the current user.
Addresses will be determined based on the addresses of the editors of the current user's affiliation.
For example, if the current user is affiliated with the Institute of Mathematics, the addresses of all editors authorized to handle projects at the Institute level will be included.
Source object
Specifies the address of the object if it is different from the current project record. If the field is empty, the system assumes that the data should be retrieved based on the current project record
Source element (or 'value')
Specifies the element (field) of the source object from which data should be retrieved. For example, specifying leader indicates that data should be retrieved based on the leader field.
You can also directly enter the value of an e-mail address enclosed in apostrophe characters, such as 'J.Baj99@wp.pl'
Source element name
If the source element specifies a composite field, then here you can specify as recurring fields the names of the fields from which email addresses should be retrieved. In this example, the deva ;fields from the person record are indicated: email and otherEmail.
Include lower level users
Indicates whether all users of lower levels should also be included if User Access Level is selected.
Another example can be seen in the definition of the COP_02 phase
In this case, the source object is the result of performing a search for the user who is the owner (owner) of the record of the current project
#{daoHelper.listQ('login=''.concat(model['projectmain'].owner).concat(''),'user','')}
which selects as the source object, the record owner's user record.
On the other hand, email addresses will be retrieved from the email and otherEmail fields from the composite author field indicated as Source Element (or 'value'). This is the field specifying the record of the person attached to the user record found.
The FACULTY_02 phase definition phase provides two methods for determining addressees:
The first method is identical to the COP_01 phase, while the second method uses the User Access Level source type.
whereby address data will be taken based on the affiliation of the project manager.
In this case, the list of email addresses will include the addresses of editors authorized to handle projects at the level of the project manager's affiliation unit and at the level of all lower-level units (Include lower-level users is checked).
It is possible to use different methods and a script at the same time, as illustrated by the following example
In this case, the list of addressees will include:
Editors' addresses downloaded according to project manager's affiliation
Editorial addresses downloaded according to the affiliation of the user, which is the project manager
The addresses of editors downloaded according to the access level of the user, which is the project manager
addresses downloaded using the script