Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

CRMScript Trigger for deleting project members

Hello,

We are programming a feature for a online customer of us for projects to set visibility like "visible for" in sales. It will have two options "all" and "project members". We plan to use Sentry Preferences for it, where these will be set in CRMScript Triggers.

Unfortunately there is no "Delete" trigger to set preferences new after deleting project members.

Are the CRMScript Triggers for delete events on the feature list for future SuperOffice versions?
How could we alternatively set preferences for the project after deleting a member? A scheduled task was in discussion, but it is to complicated for this project.

Thank you!

 

RE: CRMScript Trigger for deleting project members

Hi,

Have you looked into using webhooks with CRMScript to solve your use case?

Af: Michel Krohn-Dale 23. nov 2020

RE: CRMScript Trigger for deleting project members

Hi Michel,

thank you for uour response.

That is interesting approach with CRM Script webhooks, may be a solution.
We will give it a try.

Af: Andrey Stupak 23. nov 2020

RE: CRMScript Trigger for deleting project members

The documentation for project member webhook events
Documentation

does say, a project Id is not a part of callback content of deleting project member webhook. We tried to get "Changes" for both created and deleted to figure it out. The webhook was fired, but "Changes" was void in both cases:

Primary key and event are both there.

How can we get the project_id from a project member deleted webhook?

Edit: found it out with Changes in created: getVariable("Changes.project_id");
But this is missing in deleted webhook.

Is there a method to customize the projectmember webhook to contain project Id on delete?

Af: Andrey Stupak 23. nov 2020

RE: CRMScript Trigger for deleting project members

Hi,

Upcoming release will include more information in deleted events, example:

{
    "EventId":"88f91933-edce-4c1a-8ded-ade8e2f72434",
    "Timestamp":"2018-04-05T08:28:01.5732501Z",
    "Changes":[],
    "Values": {
      "associate_id": xxxxxx,
      "project_id": xxxxxx
    },
    "Event":"projectmember.deleted",
    "PrimaryKey":18,
    "Entity":"projectmember",
    "ContextIdentifier":"CustXXXXX",
    "ChangedByAssociateId":5,
    "WebhookName":"Name you provided"
}
Af: Michel Krohn-Dale 24. nov 2020

RE: CRMScript Trigger for deleting project members

Hello Michel,

great news, thank you!

 

Af: Andrey Stupak 24. nov 2020