function.simpleActivityContacts.php
Table of Contents
Functions
- smarty_function_simpleActivityContacts() : string
- Get details for the target and assignee contact of an activity.
Functions
smarty_function_simpleActivityContacts()
Get details for the target and assignee contact of an activity.
smarty_function_simpleActivityContacts(array<string|int, mixed> $params, CRM_Core_Smarty &$smarty) : string
This is "simple" in that it is only appropriate for activities in which the business-process guarantees that there is only one target and one assignee. If the business-process permits multiple targets or multiple assignees, then consider the more versatile (but less sugary) function "crmAPI".
Note: This will perform like a dog, but who cares -- at most, we deal with O(100) iterations as part of a background task.
Parameters
- $params : array<string|int, mixed>
-
, Array with keys:
- activity_id: int, required
- target_var: string, optional; name of a variable which will store the first/only target contact; default "target"
- assignee_var: string, optional; name of a variable which will store the first/only assignee contact; default "assignee"
- return: string, optional; comma-separated list of fields to return for each contact
- $smarty : CRM_Core_Smarty