Issue when testing out SDK 3.0 in Node Js

Issue when testing out SDK 3.0 in Node Js

Hi,
I'm trying out the Node SDK (v3.0) and I implemented the test SDK script mentioned in the README here. I used file persistance and that part worked well. The initialization worked fine, where both the access and refresh tokens got fetched and saved in the file. But the getRecords part is throwing a strange error

  1. SDKException [Error]: TypeError: module.toLowerCase is not a function

        at Function.getFieldsInfo (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:306:25)

        at processTicksAndRejections (internal/process/task_queues.js:95:5)

        at async Function.getFields (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:141:9)

        at async RecordOperations.getRecords (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/core/com/zoho/crm/api/record/record_operations.js:161:3)

        at async Function.getRecords (/Users/rajath/dev/zoho-sdk-test/zoho_sdk_test.js:146:28) {

      code: null,

      cause: TypeError: module.toLowerCase is not a function

          at Function.setDataType (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:995:42)

          at Function.getFieldsDetails (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:562:39)

          at processTicksAndRejections (internal/process/task_queues.js:95:5)

          at async Function.fileExistsFlow (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:74:33)

          at async Function.getFieldsInfo (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:178:17)

          at async Function.getFields (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/utils/util/utility.js:141:9)

          at async RecordOperations.getRecords (/Users/rajath/dev/zoho-sdk-test/node_modules/@zohocrm/nodejs-sdk-3.0/core/com/zoho/crm/api/record/record_operations.js:161:3)

          at async Function.getRecords (/Users/rajath/dev/zoho-sdk-test/zoho_sdk_test.js:146:28),

      details: null

    }


Any idea what the issue could be? The same code works fine in V2.1 of the SDK!

The code I'm testing is from the documentation:

let moduleAPIName = "Leads";

//Get instance of RecordOperations Class
let recordOperations = new RecordOperations();

let paramInstance = new ParameterMap();

await paramInstance.add(GetRecordsParam.APPROVED, "both");

let headerInstance = new HeaderMap();

await headerInstance.add(GetRecordsHeader.IF_MODIFIED_SINCE, new Date("2021-01-01T00:00:00+05:30"));

//Call getRecords method that takes paramInstance, headerInstance and moduleAPIName as parameters
let response = await recordOperations.getRecords(moduleAPIName, paramInstance, headerInstance);

if (response != null) {
<rest of the code>







                            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