Extension pointers -JS SDK series#9: A look at multiple JS SDK API methods and their potential uses in different scenarios for widgets

Extension pointers -JS SDK series#9: A look at multiple JS SDK API methods and their potential uses in different scenarios for widgets

Throughout the "Extension Pointers - JS SDK" series, we've demonstrated a wide range of APIs, their usage, and how they can be implemented in a widget, along with working examples. Let's look at a consolidation of all the APIs in this post, to get a quick overview of how APIs can be used in specific scenarios.

All of the scenarios below are based on the assumption that you intend and decide to incorporate widgets into your extension.

Scenario 1

Assume you've developed an extension with a connector for integrating a third-party application. You may now have to perform several operations, such as:
  • Retrieving records or related data from a Zoho CRM module to push into the third-party application
  • Fetching third-party application data in order to either insert or update the data in Zoho CRM modules
To implement these functionalities, you'll need to use the appropriate JS SDK API methods.

Let's take a look at the API methods that can be useful during the above-mentioned scenario:

Gets all the details of a record
Retrieves related list records
Updates a record in a module
Invokes Connector API
Prompts the Connector Authorize window

You can refer to this post to understand in detail about working with connectors in a widget, with the help of a working example.

Scenario 2

Assume you want to invoke a Deluge custom function from your widget. The execute SDK method will be handy in this case:

Invokes a function and return response

You'll have to construct the parameters required for the function and pass it to the execute method, along with the function's API name. Refer to this post for a complete working example.

Note: Only REST API functions can be invoked from a widget using invokeAPI.

Also, when dealing with a Zoho CRM module's meta data, you can use the ZOHO.CRM.META API method.

Refer to this link to get a detailed working example for getting the metadata of fields in modules.

Scenario 3

As important as it is to add new information to a record, it's equally important to delink the information when changes occur, in order to keep information up to date. Similarly, there are other activities you'll need to perform to implement your business scenarios, like adding notes to the record field to provide additional details on the changes made.

The API methods that will help cover this are:

Retrieves related list records
Delinks the relation between the records
Adds notes to a record
We've covered delink-related records with a detailed example in this post. Also, you can check out this post for a combined action that delinks a related record and adds notes.

Scenario 4

Let's say you want to handle data between two applications and make Ajax calls from a widget. There might be multiple HTTP methods that you can use to either retrieve, post, delete, or update data between applications.

In such a case, the API you can use is:

Invokes HTTP delete
Invokes HTTP get

And there are many more APIs supported by Zoho CRM JS SDK that helps you perform a variety of functions.

We hope you found this information useful. Keep following this space for more info!


      Zoho SalesIQ Resources

            Zoho TeamInbox Resources

              Zoho DataPrep Resources

                  Zoho CRM Plus Resources

                    Zoho Books Resources

                      Zoho Subscriptions Resources

                        Zoho Desk Resources

                          Zoho Projects Resources

                            Zoho Sprints Resources

                              Qntrl Resources

                                Zoho Creator Resources

                                  Zoho WorkDrive Resources

                                      Zoho Campaigns Resources

                                        Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now

                                                      Zoho Show Resources

                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

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