Search.../

deleteExtendedField( )

Developer Preview

Deletes an extended field.

Description

The deleteExtendedField() function returns a Promise that resolves when the specified extended field is deleted.

When an extended field is deleted, any contact data stored in the field is permanently deleted as well.

Note: Only visitors with Manage Contacts permissions can delete extended fields.

This function is not a universal function and runs only on the backend.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function deleteExtendedField(key: string): Promise<void>

deleteExtendedField Parameters

NAME
TYPE
DESCRIPTION
key
string

Extended field key.

Returns

Return Type:

Promise<
void
>

Was this helpful?

Delete an extended field

Copy Code
1import { extendedFields } from 'wix-crm.v2';
2
3export function myDeleteExtendedFieldFunction() {
4 const key = 'custom.event-name';
5
6 return extendedFields.deleteExtendedField(key)
7 .then(() => {
8 console.log('Extended field deleted');
9 })
10 .catch((error) => {
11 console.error(error);
12 });
13}