or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

attachments-files.mdauthentication.mdbulk-operations.mdfields-metadata.mdindex.mdinitialization.mdorganization-settings.mdrecords.mdrelated-records.mdtags-organization.mdusers.md

fields-metadata.mddocs/

0

# Fields & Metadata

1

2

The Fields & Metadata module provides access to CRM module configurations, field definitions, picklist values, and other metadata essential for understanding the structure of your CRM data.

3

4

## Capabilities

5

6

### Fields Operations

7

8

Access field definitions and metadata for CRM modules.

9

10

```javascript { .api }

11

/**

12

* Operations for retrieving field metadata and configuration

13

*/

14

class FieldsOperations {

15

/**

16

* Get all fields for a specific module

17

* @param moduleAPIName - API name of the CRM module (e.g., "Leads", "Contacts", "Accounts")

18

* @returns Promise with APIResponse containing field definitions

19

*/

20

getFields(moduleAPIName: string): Promise<APIResponse>;

21

22

/**

23

* Get details of a specific field

24

* @param moduleAPIName - API name of the CRM module

25

* @param fieldId - Unique identifier of the field

26

* @returns Promise with APIResponse containing field details

27

*/

28

getField(moduleAPIName: string, fieldId: string): Promise<APIResponse>;

29

}

30

```

31

32

**Fields Operations Example:**

33

34

```javascript

35

const { FieldsOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/fields/fields_operations");

36

37

// Get all fields for Leads module

38

const fieldsOperations = new FieldsOperations();

39

const fieldsResponse = await fieldsOperations.getFields("Leads");

40

41

if (fieldsResponse != null) {

42

const responseObject = fieldsResponse.object;

43

if (responseObject instanceof ResponseWrapper) {

44

const fields = responseObject.getFields();

45

fields.forEach(field => {

46

console.log(`Field: ${field.getAPIName()}, Type: ${field.getDataType()}`);

47

});

48

}

49

}

50

51

// Get specific field details

52

const fieldResponse = await fieldsOperations.getField("Leads", "123456789012345678");

53

```

54

55

### Modules Operations

56

57

Access module configurations and metadata.

58

59

```javascript { .api }

60

/**

61

* Operations for retrieving module metadata and configuration

62

*/

63

class ModulesOperations {

64

/**

65

* Get all modules in the CRM

66

* @param paramInstance - Optional parameters for filtering modules

67

* @param headerInstance - Optional headers for request customization

68

* @returns Promise with APIResponse containing module information

69

*/

70

getModules(paramInstance?: ParameterMap, headerInstance?: HeaderMap): Promise<APIResponse>;

71

72

/**

73

* Get details of a specific module

74

* @param moduleAPIName - API name of the CRM module

75

* @returns Promise with APIResponse containing module details

76

*/

77

getModule(moduleAPIName: string): Promise<APIResponse>;

78

79

/**

80

* Update module settings by API name

81

* @param moduleAPIName - API name of the CRM module

82

* @param request - Body wrapper containing module update data

83

* @returns Promise with APIResponse containing update results

84

*/

85

updateModuleByAPIName(moduleAPIName: string, request: BodyWrapper): Promise<APIResponse>;

86

87

/**

88

* Update module settings by module ID

89

* @param moduleId - Unique identifier of the module

90

* @param request - Body wrapper containing module update data

91

* @returns Promise with APIResponse containing update results

92

*/

93

updateModuleById(moduleId: string, request: BodyWrapper): Promise<APIResponse>;

94

}

95

```

96

97

**Modules Operations Example:**

98

99

```javascript

100

const { ModulesOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/modules/modules_operations");

101

102

// Get all modules

103

const modulesOperations = new ModulesOperations();

104

const modulesResponse = await modulesOperations.getModules();

105

106

// Get specific module details

107

const moduleResponse = await modulesOperations.getModule("Leads");

108

109

if (moduleResponse != null) {

110

const responseObject = moduleResponse.object;

111

if (responseObject instanceof ResponseWrapper) {

112

const modules = responseObject.getModules();

113

modules.forEach(module => {

114

console.log(`Module: ${module.getAPIName()}, Plural: ${module.getPluralLabel()}`);

115

});

116

}

117

}

118

```

119

120

### Layouts Operations

121

122

Access page layout definitions and configuration for different CRM modules.

123

124

```javascript { .api }

125

/**

126

* Operations for retrieving layout metadata and configuration

127

*/

128

class LayoutsOperations {

129

/**

130

* Creates a LayoutsOperations instance for a specific module

131

* @param module - Optional API name of the CRM module to filter layouts

132

*/

133

constructor(module?: string);

134

135

/**

136

* Get all layouts or layouts for a specific module

137

* @returns Promise with APIResponse containing layout definitions

138

*/

139

getLayouts(): Promise<APIResponse>;

140

141

/**

142

* Get details of a specific layout

143

* @param layoutId - Unique identifier of the layout

144

* @returns Promise with APIResponse containing layout details

145

*/

146

getLayout(layoutId: BigInt): Promise<APIResponse>;

147

}

148

```

149

150

**Layouts Operations Example:**

151

152

```javascript

153

const { LayoutsOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/layouts/layouts_operations");

154

155

// Get all layouts for a specific module

156

const layoutsOp = new LayoutsOperations("Leads");

157

const layoutsResponse = await layoutsOp.getLayouts();

158

159

// Get a specific layout

160

const layoutResponse = await layoutsOp.getLayout(123456789012345678n);

161

```

162

163

### Custom Views Operations

164

165

Access custom view definitions and filtering configurations for CRM modules.

166

167

```javascript { .api }

168

/**

169

* Operations for retrieving custom view metadata and configuration

170

*/

171

class CustomViewsOperations {

172

/**

173

* Creates a CustomViewsOperations instance for a specific module

174

* @param module - Optional API name of the CRM module to filter views

175

*/

176

constructor(module?: string);

177

178

/**

179

* Get all custom views or views for a specific module

180

* @param paramInstance - Optional parameters for filtering custom views

181

* @returns Promise with APIResponse containing custom view definitions

182

*/

183

getCustomViews(paramInstance?: ParameterMap): Promise<APIResponse>;

184

185

/**

186

* Get details of a specific custom view

187

* @param customViewId - Unique identifier of the custom view

188

* @param paramInstance - Optional parameters for filtering

189

* @returns Promise with APIResponse containing custom view details

190

*/

191

getCustomView(customViewId: BigInt, paramInstance?: ParameterMap): Promise<APIResponse>;

192

}

193

```

194

195

**Custom Views Operations Example:**

196

197

```javascript

198

const { CustomViewsOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/custom_views/custom_views_operations");

199

200

// Get all custom views for a specific module

201

const customViewsOp = new CustomViewsOperations("Leads");

202

const viewsResponse = await customViewsOp.getCustomViews();

203

204

// Get a specific custom view

205

const viewResponse = await customViewsOp.getCustomView(123456789012345678n);

206

```

207

208

### Blueprint Operations

209

210

Access and manage business process workflows and automation rules for CRM records.

211

212

```javascript { .api }

213

/**

214

* Operations for managing business process blueprints and workflows

215

*/

216

class BluePrintOperations {

217

/**

218

* Creates a BluePrintOperations instance for a specific record

219

* @param recordId - Unique identifier of the record

220

* @param moduleAPIName - API name of the CRM module

221

*/

222

constructor(recordId: BigInt, moduleAPIName: string);

223

224

/**

225

* Get blueprint details for the record

226

* @returns Promise with APIResponse containing blueprint information

227

*/

228

getBlueprint(): Promise<APIResponse>;

229

230

/**

231

* Update blueprint/workflow state for the record

232

* @param request - Body wrapper containing blueprint transition data

233

* @returns Promise with APIResponse containing update results

234

*/

235

updateBlueprint(request: BodyWrapper): Promise<APIResponse>;

236

}

237

```

238

239

**Blueprint Operations Example:**

240

241

```javascript

242

const { BluePrintOperations } = require("@zohocrm/nodejs-sdk-2.0/core/com/zoho/crm/api/blue_print/blue_print_operations");

243

244

// Get blueprint for a specific record

245

const blueprintOp = new BluePrintOperations(123456789012345678n, "Leads");

246

const blueprintResponse = await blueprintOp.getBlueprint();

247

```

248

249

### Field Data Model

250

251

Comprehensive field definition with all metadata.

252

253

```javascript { .api }

254

/**

255

* Represents a field definition in the CRM with all metadata

256

*/

257

class Field {

258

/** Get field ID */

259

getId(): string;

260

/** Set field ID */

261

setId(id: string): void;

262

263

/** Get field API name */

264

getAPIName(): string;

265

/** Set field API name */

266

setAPIName(apiName: string): void;

267

268

/** Get field display label */

269

getFieldLabel(): string;

270

/** Set field display label */

271

setFieldLabel(fieldLabel: string): void;

272

273

/** Get field data type */

274

getDataType(): string;

275

/** Set field data type */

276

setDataType(dataType: string): void;

277

278

/** Get field length */

279

getLength(): number;

280

/** Set field length */

281

setLength(length: number): void;

282

283

/** Get field precision (for decimal fields) */

284

getPrecision(): number;

285

/** Set field precision */

286

setPrecision(precision: number): void;

287

288

/** Check if field is mandatory */

289

getRequired(): boolean;

290

/** Set field as mandatory */

291

setRequired(required: boolean): void;

292

293

/** Check if field is custom */

294

getCustomField(): boolean;

295

/** Set custom field flag */

296

setCustomField(customField: boolean): void;

297

298

/** Get field default value */

299

getDefaultValue(): any;

300

/** Set field default value */

301

setDefaultValue(defaultValue: any): void;

302

303

/** Get field tooltip */

304

getTooltip(): ToolTip;

305

/** Set field tooltip */

306

setTooltip(tooltip: ToolTip): void;

307

308

/** Get field creation time */

309

getCreatedTime(): Date;

310

/** Get field modification time */

311

getModifiedTime(): Date;

312

313

/** Get picklist values (for picklist fields) */

314

getPickListValues(): PickListValue[];

315

/** Set picklist values */

316

setPickListValues(pickListValues: PickListValue[]): void;

317

318

/** Get auto number configuration (for auto-number fields) */

319

getAutoNumber(): AutoNumber;

320

/** Set auto number configuration */

321

setAutoNumber(autoNumber: AutoNumber): void;

322

323

/** Get lookup field configuration (for lookup fields) */

324

getLookup(): LookupField;

325

/** Set lookup field configuration */

326

setLookup(lookup: LookupField): void;

327

328

/** Get multi-select lookup configuration */

329

getMultiSelectLookup(): MultiSelectLookup;

330

/** Set multi-select lookup configuration */

331

setMultiSelectLookup(multiSelectLookup: MultiSelectLookup): void;

332

333

/** Check if field is read-only */

334

getReadOnly(): boolean;

335

/** Set read-only flag */

336

setReadOnly(readOnly: boolean): void;

337

338

/** Check if field supports mass update */

339

getMassUpdate(): boolean;

340

/** Set mass update support */

341

setMassUpdate(massUpdate: boolean): void;

342

343

/** Get field blueprint configuration */

344

getBlueprint(): any;

345

/** Set field blueprint configuration */

346

setBlueprint(blueprint: any): void;

347

348

/** Get multi-user lookup configuration */

349

getMultiUserLookup(): any;

350

/** Set multi-user lookup configuration */

351

setMultiUserLookup(multiUserLookup: any): void;

352

353

/** Get currency field configuration */

354

getCurrency(): Currency;

355

/** Set currency field configuration */

356

setCurrency(currency: Currency): void;

357

358

/** Get formula field configuration */

359

getFormula(): Formula;

360

/** Set formula field configuration */

361

setFormula(formula: Formula): void;

362

363

/** Get field visibility */

364

getVisible(): boolean;

365

/** Set field visibility */

366

setVisible(visible: boolean): void;

367

368

/** Get field profiles (who can see this field) */

369

getProfiles(): Profile[];

370

/** Set field profiles */

371

setProfiles(profiles: Profile[]): void;

372

}

373

```

374

375

### Picklist Values

376

377

Configuration for picklist and multi-select picklist fields.

378

379

```javascript { .api }

380

/**

381

* Represents a picklist value option

382

*/

383

class PickListValue {

384

/** Get picklist value display name */

385

getDisplayValue(): string;

386

/** Set picklist value display name */

387

setDisplayValue(displayValue: string): void;

388

389

/** Get actual picklist value */

390

getActualValue(): string;

391

/** Set actual picklist value */

392

setActualValue(actualValue: string): void;

393

394

/** Get sequence number */

395

getSequenceNumber(): number;

396

/** Set sequence number */

397

setSequenceNumber(sequenceNumber: number): void;

398

399

/** Get expected data type */

400

getExpectedDataType(): string;

401

/** Set expected data type */

402

setExpectedDataType(expectedDataType: string): void;

403

404

/** Get maps for dependent picklists */

405

getMaps(): any[];

406

/** Set maps for dependent picklists */

407

setMaps(maps: any[]): void;

408

}

409

```

410

411

### Lookup Field Configuration

412

413

Configuration for lookup and multi-lookup fields.

414

415

```javascript { .api }

416

/**

417

* Lookup field configuration

418

*/

419

class LookupField {

420

/** Get lookup module */

421

getModule(): string;

422

/** Set lookup module */

423

setModule(module: string): void;

424

425

/** Get display label */

426

getDisplayLabel(): string;

427

/** Set display label */

428

setDisplayLabel(displayLabel: string): void;

429

430

/** Get API name */

431

getAPIName(): string;

432

/** Set API name */

433

setAPIName(apiName: string): void;

434

435

/** Get lookup field ID */

436

getId(): string;

437

/** Set lookup field ID */

438

setId(id: string): void;

439

}

440

441

/**

442

* Multi-select lookup field configuration

443

*/

444

class MultiSelectLookup {

445

/** Get display label */

446

getDisplayLabel(): string;

447

/** Set display label */

448

setDisplayLabel(displayLabel: string): void;

449

450

/** Get linking module */

451

getLinkingModule(): string;

452

/** Set linking module */

453

setLinkingModule(linkingModule: string): void;

454

455

/** Get lookup API name */

456

getLookupApiname(): string;

457

/** Set lookup API name */

458

setLookupApiname(lookupApiname: string): void;

459

460

/** Get API name */

461

getAPIName(): string;

462

/** Set API name */

463

setAPIName(apiName: string): void;

464

465

/** Get connected module */

466

getConnectedModule(): string;

467

/** Set connected module */

468

setConnectedModule(connectedModule: string): void;

469

470

/** Get ID */

471

getId(): string;

472

/** Set ID */

473

setId(id: string): void;

474

}

475

```

476

477

### Module Data Model

478

479

Comprehensive module configuration and metadata.

480

481

```javascript { .api }

482

/**

483

* Represents a CRM module with all configuration and metadata

484

*/

485

class Module {

486

/** Get module ID */

487

getId(): string;

488

/** Set module ID */

489

setId(id: string): void;

490

491

/** Get module API name */

492

getAPIName(): string;

493

/** Set module API name */

494

setAPIName(apiName: string): void;

495

496

/** Get module display name (singular) */

497

getSingularLabel(): string;

498

/** Set module display name (singular) */

499

setSingularLabel(singularLabel: string): void;

500

501

/** Get module display name (plural) */

502

getPluralLabel(): string;

503

/** Set module display name (plural) */

504

setPluralLabel(pluralLabel: string): void;

505

506

/** Check if module is creatable */

507

getCreatable(): boolean;

508

/** Set creatable flag */

509

setCreatable(creatable: boolean): void;

510

511

/** Check if module is editable */

512

getEditable(): boolean;

513

/** Set editable flag */

514

setEditable(editable: boolean): void;

515

516

/** Check if module is deletable */

517

getDeletable(): boolean;

518

/** Set deletable flag */

519

setDeletable(deletable: boolean): void;

520

521

/** Check if module is viewable */

522

getViewable(): boolean;

523

/** Set viewable flag */

524

setViewable(viewable: boolean): void;

525

526

/** Check if module supports API names */

527

getAPISupported(): boolean;

528

/** Set API supported flag */

529

setAPISupported(apiSupported: boolean): void;

530

531

/** Check if module is custom */

532

getCustomModule(): boolean;

533

/** Set custom module flag */

534

setCustomModule(customModule: boolean): void;

535

536

/** Get scoring supported flag */

537

getScoringSupported(): boolean;

538

/** Set scoring supported flag */

539

setScoringSupported(scoringSupported: boolean): void;

540

541

/** Get webform supported flag */

542

getWebformSupported(): boolean;

543

/** Set webform supported flag */

544

setWebformSupported(webformSupported: boolean): void;

545

546

/** Get module arguments */

547

getArguments(): Argument[];

548

/** Set module arguments */

549

setArguments(arguments: Argument[]): void;

550

551

/** Get module parent module */

552

getParentModule(): string;

553

/** Set module parent module */

554

setParentModule(parentModule: string): void;

555

556

/** Get business card field limit */

557

getBusinessCardFieldLimit(): number;

558

/** Set business card field limit */

559

setBusinessCardFieldLimit(limit: number): void;

560

561

/** Get related list properties */

562

getRelatedListProperties(): RelatedListProperties;

563

/** Set related list properties */

564

setRelatedListProperties(properties: RelatedListProperties): void;

565

566

/** Get module properties */

567

getProperties(): string[];

568

/** Set module properties */

569

setProperties(properties: string[]): void;

570

571

/** Get per page count */

572

getPerPage(): number;

573

/** Set per page count */

574

setPerPage(perPage: number): void;

575

576

/** Get module visibility */

577

getVisibility(): number;

578

/** Set module visibility */

579

setVisibility(visibility: number): void;

580

581

/** Check if module is convertable */

582

getConvertable(): boolean;

583

/** Set convertable flag */

584

setConvertable(convertable: boolean): void;

585

586

/** Check if module supports email template */

587

getEmailtemplateSupport(): boolean;

588

/** Set email template support */

589

setEmailtemplateSupport(emailtemplateSupport: boolean): void;

590

591

/** Get module profiles */

592

getProfiles(): Profile[];

593

/** Set module profiles */

594

setProfiles(profiles: Profile[]): void;

595

596

/** Check if module supports filter status */

597

getFilterStatus(): boolean;

598

/** Set filter status */

599

setFilterStatus(filterStatus: boolean): void;

600

601

/** Get inventory template supported */

602

getInventoryTemplateSupported(): boolean;

603

/** Set inventory template supported */

604

setInventoryTemplateSupported(inventoryTemplateSupported: boolean): void;

605

606

/** Get modified time */

607

getModifiedTime(): Date;

608

/** Set modified time */

609

setModifiedTime(modifiedTime: Date): void;

610

611

/** Get modified by user */

612

getModifiedBy(): User;

613

/** Set modified by user */

614

setModifiedBy(modifiedBy: User): void;

615

}

616

```

617

618

### Data Types and Constants

619

620

Common field data types and module properties.

621

622

```javascript { .api }

623

/**

624

* Field data type constants

625

*/

626

class DataType {

627

static TEXT: string = "text";

628

static TEXTAREA: string = "textarea";

629

static PICKLIST: string = "picklist";

630

static MULTISELECTPICKLIST: string = "multiselectpicklist";

631

static INTEGER: string = "integer";

632

static BIGINT: string = "bigint";

633

static DOUBLE: string = "double";

634

static CURRENCY: string = "currency";

635

static DECIMAL: string = "decimal";

636

static BOOLEAN: string = "boolean";

637

static DATE: string = "date";

638

static DATETIME: string = "datetime";

639

static LOOKUP: string = "lookup";

640

static MULTISELECTLOOKUP: string = "multiselectlookup";

641

static EMAIL: string = "email";

642

static PHONE: string = "phone";

643

static URL: string = "url";

644

static AUTONUMBER: string = "autonumber";

645

static FORMULA: string = "formula";

646

static FILEUPLOAD: string = "fileupload";

647

}

648

649

/**

650

* Module property constants

651

*/

652

class ModuleProperty {

653

static CONVERTABLE: string = "convertable";

654

static EDITABLE: string = "editable";

655

static DELETABLE: string = "deletable";

656

static API_SUPPORTED: string = "api_supported";

657

static CUSTOM_MODULE: string = "custom_module";

658

static WEBFORM_SUPPORTED: string = "webform_supported";

659

static SCORING_SUPPORTED: string = "scoring_supported";

660

}

661

```