renameExtendedField( )


Renames an extended field.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Members and Contacts - all permissions
Manage Contact Extended Fields
Learn more about app permissions.
Method Declaration
Copy
function renameExtendedField(
  key: string,
  field: RenameExtendedField,
): Promise<ExtendedField>;
Method Parameters
keystringRequired

null


fieldRenameExtendedFieldRequired

null

Returns
Return Type:Promise<ExtendedField>
JavaScript
import { extendedFields } from "wix-crm.v2"; /* Sample key value: * * 'custom.nickname' * * Sample field value: * { * 'Contact Nickname' * } */ export async function myRenameExtendedFieldFunction(key, field) { try { const renamedExtendedField = await extendedFields.renameExtendedField( key, field, ); console.log("Successfulyl renamed extendedField:", renamedExtendedField); return renamedExtendedField; } catch (error) { console.log(error); // Handle the error } } /* Promise resolves to: * { * "namespace": "custom", * "key": "custom.nickname", * "displayName": "Contact Nickname", * "dataType": "TEXT", * "fieldType": "USER_DEFINED", * "legacyId": "63408eaf-e3d0-43f3-afa5-942847d272a1", * "wixSearchColumn": "info_extendedFields_custom_string_18", * "_createdDate": "2023-12-25T12:21:42.000Z", * "_updatedDate": "2023-12-25T13:25:35.000Z" * } */
Errors

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

Did this help?