Search.../

deleteExtendedField( )

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. You can override the permissions by setting the suppressAuth option to true.

Syntax

function deleteExtendedField(key: string, [options: AuthOptions]): Promise<void>

deleteExtendedField Parameters

NAME
TYPE
DESCRIPTION
key
string

Extended field ID.

options
Optional
AuthOptions

Authorization options.

Returns

Return Type:

Promise<void>

Was this helpful?

Delete an extended field

Copy Code
1import { contacts } from 'wix-crm-backend';
2
3export function myDeleteExtendedFieldFunction() {
4 const fieldKey = "custom.event-name";
5 const options = {
6 suppressAuth: false
7 };
8
9 return contacts.deleteExtendedField(fieldKey, options)
10 .then(() => {
11 console.log("Extended field deleted");
12 })
13 .catch((error) => {
14 console.error(error);
15 });
16}