Trigger script - Project owner changed

lock
push_pin
done
Beantwortet
1

Hi, 

 

I'm testing out how to notificate a project owner once a project has been assigned to them. This can be notified with an appointment task of 1 minute. 

 

However, I need help with the trigger script. Has anyone else set up a similar script? 

 

I don't have too much experience with CRMscript, but would love to see some examples that I could work out further.

 

Thanks in advance!

7. Dez. 2023 | 12:47 PM

Alle Antworten (1)

A trigger script is run when a particular screen is shown - in other words, it's tied to the user-interface.

Triggers are not run when an API call changes the project, but webhooks are.

The scripts would be similar - but triggers are set up using the admin UI, while webhook scripts need to be registered via the API - there is no UI for webhooks.

You can use trigger script to create the appointment: 

CRMScript_Event_Trigger_SalesAfterSaveProject

Use the EventData to see if the project associate_id has changed, and if so, create a new appointment in the new owner's diary.

You can set the new appointment assignedBy and AssignmentStatus to make the appointment appear as a notification for the new owner.

 

12. Dez. 2023 | 10:24 AM

Antwort hinzufügen