> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: getExtendedField(key: string) # Method package: wixCrmV2 # Method menu location: wixCrmV2 --> extendedFields --> getExtendedField # Method Link: https://dev.wix.com/docs/velo/apis/wix-crm-v2/extended-fields/get-extended-field.md # Method Description: Retrieves an extended field by the specified extended field key. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get a specified extended field (dashboard page code) ```javascript import { extendedFields } from 'wix-crm.v2'; /* Sample key value: 'custom.nickname' */ export async function myGetExtendedFieldFunction(key) { try { const extendedField = await extendedFields.getExtendedField(key); console.log('Successfully retrieved extended field:', extendedField); return extendedField; } catch (error) { console.log(error); // Handle the error } } /* * Promise resolves to: * { * "namespace": "custom", * "key": "custom.nickname", * "displayName": "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-25T12:22:25.000Z" * } */ ``` ## Get a specified extended field (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { extendedFields } from 'wix-crm.v2'; import { elevate } from 'wix-auth'; /* Sample key value: 'custom.nickname' */ export const myGetExtendedFieldFunction = webMethod(Permissions.Anyone, async (key) => { try { const elevatedGetExtendedField = elevate(extendedFields.getExtendedField); const extendedField = await elevatedGetExtendedField(key); console.log('Successfully retrieved extended field:', extendedField); return extendedField; } catch (error) { console.log(error); // Handle the error } }); /* * Promise resolves to: * { * "namespace": "custom", * "key": "custom.nickname", * "displayName": "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-25T12:22:25.000Z" * } */ ``` ## Get the dataType for the specified extended field ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { extendedFields } from 'wix-crm.v2'; import { elevate } from 'wix-auth'; export const myGetExtendedFieldFunction = webMethod(Permissions.Anyone, async (key) => { try { const elevatedGetExtendedField = elevate(extendedFields.getExtendedField); const extendedField = await elevatedGetExtendedField(key); const nicknameType = extendedField.dataType; return nicknameType } catch (error) { console.log(error); // Handle the error } }); // Return value: "TEXT" ``` ---