We’ve developed some resources to help you work effectively from
home during COVID-19 Click to learn more
I need to execute a script when a follow-up is removed. Trigger can be used when a follow-up is saved, but I can't find that it can be used when a follow-up is removed. Is there a way to get this done?
As seen in the UI, triggers only support Before and After Save events. To achieve what you want, you can create a webhook for projectmember.deleted that invokes a script. Here is a forum post that contains example code that demonstrates how.
Didn't think of that, thanks!
Am looking into this and I need to get the contact_id (either direct or via appointment_id). But the documentation (https://community.superoffice.com/documentation/sdk/SO.NetServer.Web.Services/html/Reference-Webhooks-ActivityEvents.htm) states that the Changes for Activity.deleted does not contain any information.
Is that the case? Is there no way of knowing the id of the appointment or the contact for the deleted activity?
The "PrimaryKey" value is the ID of the appointment that is deleted, retrieving the contact id of the appointment is going to be difficult since the record containing that data what just deleted...
So, got the ID from the PrimaryKey. But as the appointment has been deleted, no further information can be retrieved. I then assume we can not do anything with the company connected to the deleted company.
Am I making a correct assumption?
Yes that is an correct assumption, by default you will not be able to get info about the company from the deleted appointment using a webhook. There a possibility's for OnSite to add extra info to the webhook event but that is a complex endeavor.
A 'solution' here would be to keep track of appointment_id <-> contact_id in an extra table, and when you receive the delete webhook event you can look-up the contact id of the deleted appointment in the extra table.
Will then send in a wish to include such info. Had a similar case with the webhook for projectmember.deleted and the project ID not being included.
I know nothing about any of this but it seems to me that the Web/Online universe is missing what the Win client has in its COM events: the *BeforeSave and *BeforeDelete events./conrad
There are BeforeSave trigger events but there are indeed no BeforeDelete trigger events like in the Win client.
SchließenDiese Site verwendet Cookies. SuperOffice verwendet Cookies hauptsächlich dazu, um den Gebrauch der Website zu überwachen und den Inhalt zu optimieren. Bitte verwenden Sie weiterhin diese Site, wenn Sie Cookies zulassen. Mehr: Datenschutzerklärung