Questa informazione non è disponibile in italiano. Pertanto sarà visualizzata in inglese.
Upon activation of portatour® customers, the 'Last Customer Call' field is empty by default. If your organization already includes the date of the last visit, portatour® can use this information for activation.
Enter a valid SOQL Query which returns a dataset with a DateTime or Date field type. You can also use aggregate functions or LIMIT. The ID of the respective customer object (e.g. Account) is forwarded through the :RecordID parameter.
Click on Sample Query to use a sample query. The sample query in the screenshot above returns the date of the most recent Activity, which is not a recurring Event, not an all-day Event, not in the future and not older than 2 years.
General requirements for the SOQL Query:
- Filter using :RecordID
- Limit the results to a realistic time frame in the past, for example the last year. The date must not be in the future
- Exactly one column of type DateTime or Date
- Exactly one row should be returned (use aggregate functions or LIMIT)
Example of a Query using a field of type Date:
SELECT ActivityDate
FROM Task
WHERE (WhatID=:RecordID) AND (ActivityDate != NULL)
AND (ActivityDate<=TODAY) AND (ActivityDate>=LAST_N_DAYS:730)
ORDER BY ActivityDate DESC
LIMIT 1
Check the Query by selecting the dataset and clicking Validate. portatour® executes the Query and shows the resulting value. Select Validate and Save to save the settings.
You can adjust additional fields dynamically, see section Using dynamic Data Fields.