Kaizen #146 - Assigning values to different field types using Zoho CRM SDKs - Part IV

Kaizen #146 - Assigning values to different field types using Zoho CRM SDKs - Part IV


Welcome to another Kaizen week!

In our ongoing effort to enhance your Zoho CRM integration skills, we have been exploring various field types and demonstrating how to manage them using our different SDKs. So far, we have covered the Java, PHP, and Python SDKs in detail. Today, in Part IV, we will discuss field management using our remaining SDK offerings: NodeJS, Ruby, Scala, TypeScript, C#, and JavaScript. 
Here is a glimpse of how to manage the field data using these SDKs.

4. NodeJS SDK

For more details, please refer to the GitHub repository for our latest NodeJS SDK. Check out the sample codes here.

Standard Fields:

a. Import the Field Class:
  1. import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-6.0";
  2. let record = new ZOHOCRMSDK.Record.Record();
b. Assign Values to Standard Fields:
The syntax for assigning values to standard fields uses the addFieldValue method of the Record object:
  1. await record.addFieldValue(Field.{module_api_name}.{FIELD_API_NAME},value);
Replace {module_api_name} and {FIELD_API_NAME} with the appropriate values for your specific use case. Please note that the FIELD_API_NAME should always be uppercase.

For instance, to assign value to a text field, use:
      await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name");
To assign a null value to the same field, use:
await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, null);

Custom Fields:

To manage custom fields using NodeJS SDK:
a. Import the Record Class:
  1. import * as ZOHOCRMSDK from "@zohocrm/nodejs-sdk-6.0";
  2. let record = new ZOHOCRMSDK.Record.Record();
b. Assign Values to Custom Fields:
The syntax for assigning values to standard fields uses the addKeyValue method of the Record object:
  1. record.addKeyValue("{field_api_name}", value);
Replace {field_api_name} with the appropriate values for your specific use case. 

For instance, to assign value to a custom text field, use:
      record.addKeyValue("Single_Line_Field", "Text Single Line Value");
To assign a null value to the same field, use:
record.addKeyValue("Single_Line_Field", null);

5. C#

For more details, please refer to the GitHub repository for our latest C# SDK. Check out the sample codes here.

Standard Fields:

a. Import the Field Class:
  1. using Com.Zoho.Crm.API.Record.Field;
b. Assign Values to Standard Fields:
The syntax for assigning values to standard fields uses the AddFieldValue method of the Record object:
  1. record.AddFieldValue(Com.Zoho.Crm.API.Record.{module_api_name}.{FIELD_API_NAME}, value);
Replace {module_api_name} and {FIELD_API_NAME} with the appropriate values for your specific use case. Please note that the FIELD_API_NAME should always be uppercase.

For example, to assign a value to a text field, 
      record.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LAST_NAME, "Last Name");
To assign a null value to the same text field.
      record.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LAST_NAME, null);

Custom Fields:

To manage custom fields using CSharp SDK:
a. Import the Record Class:
  1. Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record();
b. Assign Values to Custom Fields:
The syntax for assigning values to standard fields uses the AddKeyValue method of the Record object:
  1. record.AddKeyValue("{field_api_name}", value);
Replace {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.AddKeyValue("Single_Line_Field", "Text Single Line value");
To assign a null value to the same text field.
      record.AddKeyValue("Single_Line_Field5", null);

6. Scala

For more details, please refer to the GitHub repository for our latest Scala SDK.

Standard Fields:

a. Import the Field Class:
  1. import com.zoho.crm.api.record.Record
  2. import com.zoho.crm.api.record.Field.{Leads}
  3. val record = new Record
b. Assign Values to Standard Fields:
The syntax for assigning values to standard fields uses the addFieldValue method of the Record object:
  1. record.addFieldValue(new Field.{module_api_name}.{field_api_name}, "Field Value");
Replace {module_api_name} and {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.addFieldValue(new Field.Leads().LastName, "Last Name")
To assign a null value to the same text field.
      record.addFieldValue(new Field.Leads().LastName, null)

Custom Fields:

To manage custom fields using Scala SDK:
a. Import the Record Class:
  1. import com.zoho.crm.api.record.Record
  2. import com.zoho.crm.api.record.Field.{Leads}
  3. val record = new Record
b. Assign Values to Custom Fields:
The syntax for assigning values to standard fields uses the addKeyValue method of the Record object:
  1. record.addKeyValue("{field_api_name}", value);
Replace {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.addKeyValue("Single_Line_Field", "Text Single Line value");
To assign a null value to the same text field.
      record.addKeyValue("Single_Line_Field", null);

7. Ruby 

For more details, please refer to the GitHub repository for our latest Ruby SDK. 

Standard Fields:

a. Import the Field Class:
  1. require 'ZOHOCRMSDK6_0'
  2. record = ZOHOCRMSDK::Record::Record.new
b. Assign Values to Standard Fields:
The syntax for assigning values to standard fields uses the add_field_value method of the Record object:
  1. record.add_field_value(ZOHOCRMSDK::Record::Field::{module_api_name}.{field_api_name}, "value")
Replace {module_api_name} and {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.add_field_value(ZOHOCRMSDK::Record::Field::Leads.Last_name, "Last Name")
To assign a null value to the same text field.
      record.add_field_value(ZOHOCRMSDK::Record::Field::Leads.Last_name, nil)

Custom Fields:

To manage custom fields using Ruby SDK:
a. Import the Record Class:
  1. require 'ZOHOCRMSDK6_0'
  2. record = ZOHOCRMSDK::Record::Record.new
b. Assign Values to Custom Fields:
The syntax for assigning values to standard fields uses the add_key_value method of the Record object:
  1. record.add_key_value("{field_api_name}", value);
Replace {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.add_key_value("Single_Line_Field", "Text Single Line value");
To assign a null value to the same text field.
      record.add_key_value("Single_Line_Field", nil);

8. TypeScript

For more details, please refer to the GitHub repository for our latest Typescript SDK. Check out the sample codes here.

Standard Fields:

a. Import the Field Class:
  1. import * as ZOHOCRMSDK from "@zohocrm/typescript-sdk-6.0";
  2. let record = new ZOHOCRMSDK.Record.Record();
b. Assign Values to Standard Fields:
The syntax for assigning values to standard fields uses the addFieldValue method of the Record object:
  1. await record.addFieldValue(ZOHOCRMSDK.Record.Field.{module_api_name}.{FIELD_API_NAME},value);
Replace {module_api_name} and {FIELD_API_NAME} with the appropriate values for your specific use case. Please note that the FIELD_API_NAME should always be uppercase.

For example, to assign a value to a text field, 
      await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, "Last Name");
To assign a null value to the same text field.
      await record.addFieldValue(ZOHOCRMSDK.Record.Field.Leads.LAST_NAME, null);

Custom Fields:

To manage custom fields using TypeScript SDK:
a. Import the Record Class:
  1. import * as ZOHOCRMSDK from "@zohocrm/typescript-sdk-6.0";
  2. let record = new ZOHOCRMSDK.Record.Record();
b. Assign Values to Custom Fields:
The syntax for assigning values to standard fields uses the addKeyValue method of the Record object:
  1. record.addKeyValue("{field_api_name}", value);
Replace {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.addKeyValue("Single_Line_Field", "Text Single Line value");
To assign a null value to the same text field.
      record.addKeyValue("Single_Line_Field", null);

9. Javascript

For more details, please refer to the GitHub repository for our latest Javascript SDK. Check out the sample codes here.

Standard Fields:

a. Import the Field Class:
  1. let record = new ZCRM.Record.Model.Record();
b. Assign Values to Standard Fields:
The syntax for assigning values to standard fields uses the addFieldValue method of the Record object:
  1. record.addFieldValue(ZCRM.Record.Model.Field.{module_api_name}.{FIELD_API_NAME}, "value")
Replace {module_api_name} and {FIELD_API_NAME} with the appropriate values for your specific use case. Please note that the FIELD_API_NAME should always be uppercase.

For example, to assign a value to a text field, 
      record.addFieldValue(ZCRM.Record.Model.Field.Leads.LAST_NAME, "Last Name");
To assign a null value to the same text field.
      record.addFieldValue(ZCRM.Record.Model.Field.Leads.LAST_NAME, null);

Custom Fields:

To manage custom fields using Javascript SDK:
a. Import the Record Class:
  1. let record = new ZCRM.Record.Model.Record();
b. Assign Values to Custom Fields:
The syntax for assigning values to standard fields uses the addKeyValue method of the Record object:
  1. record.addKeyValue("{field_api_name}", value);
Replace {field_api_name} with the appropriate values for your specific use case. 

For example, to assign a value to a text field, 
      record.addKeyValue("Single_Line_Field", "Text Single Line value");
To assign a null value to the same text field.
      record.addKeyValue("Single_Line_Field", null);

We hope this series has provided you with valuable insights into managing different field types in Zoho CRM using our diverse range of SDKs. Should you have any questions or require further assistance with any of our SDKs, or any other developer tools, please don't hesitate to reach out in the comments or via email at support@zohocrm.com. Your feedback helps us improve and tailor our content to serve your needs better.

Thank you for being a part of our journey. Keep an eye out for more in-depth and developer-centric content in our Kaizen series, released every Friday!


Recommended Reads:











    Access your files securely from anywhere


          All-in-one knowledge management and training platform for your employees and customers.






                                Zoho Developer Community




                                                      • Desk Community Learning Series


                                                      • Digest


                                                      • Functions


                                                      • Meetups


                                                      • Kbase


                                                      • Resources


                                                      • Glossary


                                                      • Desk Marketplace


                                                      • MVP Corner


                                                      • Word of the Day


                                                      • Ask the Experts



                                                                • Sticky Posts

                                                                • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                                  Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                                • Kaizen #226: Using ZRC in Client Script

                                                                  Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
                                                                • Kaizen #222 - Client Script Support for Notes Related List

                                                                  Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
                                                                • Kaizen #217 - Actions APIs : Tasks

                                                                  Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
                                                                • Kaizen #216 - Actions APIs : Email Notifications

                                                                  Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are


                                                                Manage your brands on social media



                                                                      Zoho TeamInbox Resources



                                                                          Zoho CRM Plus Resources

                                                                            Zoho Books Resources


                                                                              Zoho Subscriptions Resources

                                                                                Zoho Projects Resources


                                                                                  Zoho Sprints Resources


                                                                                    Qntrl Resources


                                                                                      Zoho Creator Resources



                                                                                          Zoho CRM Resources

                                                                                          • CRM Community Learning Series

                                                                                            CRM Community Learning Series


                                                                                          • Kaizen

                                                                                            Kaizen

                                                                                          • Functions

                                                                                            Functions

                                                                                          • Meetups

                                                                                            Meetups

                                                                                          • Kbase

                                                                                            Kbase

                                                                                          • Resources

                                                                                            Resources

                                                                                          • Digest

                                                                                            Digest

                                                                                          • CRM Marketplace

                                                                                            CRM Marketplace

                                                                                          • MVP Corner

                                                                                            MVP Corner









                                                                                              Design. Discuss. Deliver.

                                                                                              Create visually engaging stories with Zoho Show.

                                                                                              Get Started Now


                                                                                                Zoho Show Resources

                                                                                                  Zoho Writer

                                                                                                  Get Started. Write Away!

                                                                                                  Writer is a powerful online word processor, designed for collaborative work.

                                                                                                    Zoho CRM コンテンツ





                                                                                                      Nederlandse Hulpbronnen


                                                                                                          ご検討中の方