Creating a view for a group
- Click <My Profile> | Administration | Customization | Primary Entities or Secondary Entities | <Entity> | Views.
- Click New.
- Enter a view name that starts with "v" and contains a single word with no spacing. For example, vSimpleCaseView.
- To make the view available when creating a new group, select Groups View.
- Enter a short description and a translation for the view. The translation is displayed on screen when the user selects the view.
- Enter SQL for the view in View Script and include the relevant unique identifier fields. For more information, see Unique identifier fields. The following example creates a new case view available for use when creating company and person groups.
CREATE VIEW
vSimpleCaseView
AS
SELECT case_caseid, comp_companyid, comp_name, comp_status, comp_type, case_description, pers_personid, pers_firstname, pers_lastname, case_secterr, comp_secterr, pers_secterr, comp_primaryuserid, comp_channelid, pers_primaryuserid, pers_channelid, case_assigneduserid, case_channelid
FROM company
INNER JOIN cases
ON comp_companyid = case_primarycompanyid
INNER JOIN person
ON case_primarypersonid = pers_personid - Click Save. The view is available to use in a group. For more information see Creating a group in the User Help.
A view must return one row per ID field. If the view returns duplicate rows, it is not listed in the Source View drop-down when creating a group.
