Triggered when a label is updated.
function wixContacts_onLabelUpdated(event: LabelUpdated): void;
Information about the task that was updated and metadata for the event.
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixContacts_onLabelUpdated(event) {
const eventId = event.metadata.id;
const entityId = event.entity._id;
const displayName = event.entity.displayName;
console.log("Label updated", event);
}
/* Full event object:
* {
* "metadata": {
* "id": "a830a129-81af-47ed-b604-4e0f13ccb4cb",
* "entityId": "custom.customer-group-3",
* "eventTime": "2024-01-11T12:41:47.979883060Z",
* "triggeredByAnonymizeRequest": false
* },
* "entity": {
* "namespace": "custom",
* "namespaceDisplayName": "Labels",
* "key": "custom.customer-group-3",
* "displayName": "Customer Group No. 3",
* "labelType": "USER_DEFINED",
* "legacyId": "222e7d37-9795-45e2-a6ef-58a40981a43c",
* "_createdDate": "2024-01-11T12:36:10.000Z",
* "_updatedDate": "2024-01-11T12:41:48.000Z"
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.