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:











      Zoho Developer Community









                                Zoho Desk Resources

                                • Desk Community Learning Series


                                • Digest


                                • Functions


                                • Meetups


                                • Kbase


                                • Resources


                                • Glossary


                                • Desk Marketplace


                                • MVP Corner


                                • Word of the Day



                                    Zoho Marketing Automation


                                            Manage your brands on social media



                                                  Zoho TeamInbox Resources

                                                    Zoho DataPrep Resources



                                                      Zoho CRM Plus Resources

                                                        Zoho Books Resources


                                                          Zoho Subscriptions Resources

                                                            Zoho Projects Resources


                                                              Zoho Sprints Resources


                                                                Qntrl Resources


                                                                  Zoho Creator Resources


                                                                    Zoho WorkDrive Resources



                                                                      Zoho Campaigns Resources


                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • 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