From 38241ddc2164514b437266c8f08957e7a8cf9d90 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:12:27 +0200 Subject: [PATCH 1/2] Update points.rst to explain point trigger on another Contact Update points.rst to explain point trigger on another Contact --- docs/components/points.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/components/points.rst b/docs/components/points.rst index 55fcba42..7ecf7cfb 100644 --- a/docs/components/points.rst +++ b/docs/components/points.rst @@ -83,6 +83,15 @@ In order for the custom Point Action to work, add something like the following i $this->getModel('point')->triggerAction('helloworld.action', $event->getHit()); +This triggers the custom Point Action for the currently tracked Contact. If you need to perform the Point Action on another Contact you have to pass the Contact's object when invoking ``triggerAction``: + +.. code-block:: php + + getModel('point')->triggerAction('helloworld.action', $event->getHit()); + + .. vale off Custom Point Action definition @@ -238,4 +247,4 @@ Custom Point Trigger definition * - ``callback`` - OPTIONAL - mixed - - Static callback function used to execute the custom action. \ No newline at end of file + - Static callback function used to execute the custom action. From 0a80cde0cd03fb75d28cd9ccba9336e77d67266c Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:14:55 +0200 Subject: [PATCH 2/2] Update points.rst --- docs/components/points.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/points.rst b/docs/components/points.rst index 7ecf7cfb..fc12b401 100644 --- a/docs/components/points.rst +++ b/docs/components/points.rst @@ -89,7 +89,7 @@ This triggers the custom Point Action for the currently tracked Contact. If you getModel('point')->triggerAction('helloworld.action', $event->getHit()); + $this->getModel('point')->triggerAction('helloworld.action', $event->getHit(), null, $someOtherLead); .. vale off