Creating a view for Advanced Find
Users can use Advanced Find to perform complex database searches across cases, communications, companies, leads, opportunities, orders, people, quotes, and solutions. You can create enhanced searches based on a WHERE clause, and you can extend the selection criteria using AND and OR clauses.
To create an Advanced Find view for a custom entity:
- Click <My Profile> | Administration | Customization | <Entity>.
- Click the Views tab and click New.
- Enter a view name in View Name and move the cursor to another field. The start of the script is automatically added to View Script.
- Enter a short description of the view in Description.
- Select Groups View.
- Enter a translation for the view in Translation.
- Enter SQL in View Script. The SQL below creates a view called vSearchListproject for a custom entity called Project.
CREATE VIEW vSearchListproject
AS
SELECT RTRIM(ISNULL(Pers_FirstName, '')) + ' ' + RTRIM(ISNULL(Pers_LastName, '')) AS Pers_FullName,
RTRIM(ISNULL(Pers_PhoneCountryCode, '')) + ' ' + RTRIM(ISNULL(Pers_PhoneAreaCode, '')) + ' ' +
RTRIM(ISNULL(Pers_PhoneNumber, '')) AS Pers_PhoneFullNumber,
RTRIM(ISNULL(Pers_FaxCountryCode, '')) + ' ' + RTRIM(ISNULL(Pers_FaxAreaCode, '')) + ' ' +
RTRIM(ISNULL(Pers_FaxNumber, '')) AS Pers_FaxFullNumber,
Project.*,
vCompanyPE.*,
vPersonPE.*
FROM Project
LEFT OUTER JOIN vCompanyPE ON Proj_CompanyId = Comp_CompanyId
LEFT OUTER JOIN vPersonPE ON Proj_PersonId = Pers_PersonId
WHERE Proj_Deleted IS NULL
- Click Save.
Next, you must add the translations to the custom_edits metadata table so the custom entity is included on the Advanced Find screen. The steps below add translations for a custom entity called Project.
- Click <My Profile> | Administration | Customization | <Entity> | Translations.
- Add Project in Caption Code.
- Add AdvFindEntities in Caption Family.
- Add Choices in Caption Family Type.
- Add Project in US Translation.
- Add Project in UK Translation.
- Click Save.
