deleteExtendedField( )


Deletes an extended field.

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.

Method Declaration
Copy
function deleteExtendedField(key: string, options: AuthOptions): Promise<void>;
Method Parameters
keystringRequired

Extended field ID.


optionsAuthOptions

Authorization options.

Delete an extended field
JavaScript
import { Permissions, webMethod } from "wix-web-module"; import { contacts } from "wix-crm-backend"; export const myDeleteExtendedFieldFunction = webMethod( Permissions.Anyone, () => { const fieldKey = "custom.event-name"; const options = { suppressAuth: false, }; return contacts .deleteExtendedField(fieldKey, options) .then(() => { console.log("Extended field deleted"); }) .catch((error) => { console.error(error); }); }, );
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?