JS SDK Library

JS SDK Library

JS SDK URL to be included in your code before calling the following SDK methods:
To register listeners with widgets:
Use the following code snippet to initialize your widget and start listening to events in your Zoho People application.
ZOHO.embeddedApp.init();

Get form id

Supported only for Related list and custom button widgets.
To get form id where the widget is currently rendered, use:
ZOHO.People.API.getFormId()

Response

String(record id)

Get form field components

To get form field components, use:
ZOHO.People.API.getFormComponents();

Response

[{
"comptype": "Text",
"ismandatory": true,
"descriptionType": 0,
"displayname": "EmployeeID",
"autofillvalue": "",
"description": "",
"formcomponentid": "115782000000020183",
"labelname": "EmployeeID",
"maxLength": 100
}, {
"comptype": "Text",
"ismandatory": true,
"descriptionType": 0,
"displayname": "Last Name",
"autofillvalue": "",
"description": "",
"formcomponentid": "115782000000020187",
"labelname": "LastName",
"maxLength": 100
}]

Add form record

To add a form record, use:
ZOHO.People.API.addFormData(inputData);
 
 inputData
 JSON Input: 
 
 {formName:<form name>, input:{LabelName:value, LabelName1:value}};

  For formName - Refer here

 For LabelName - Refer here

 

Response

Success Response: Data added successfully
Failure Response: Error occurred

Update form record

To update the form record, use:
ZOHO.People.API.updateFormData(inputData);
 
 inputData
 JSON Input: 
 
 {formName:<form name>, input:{LabelName:value,   LabelName1:value},recordId:   <form record id>};

 For formName - Refer here

Response

Success Response: Data updated successfully
Failure Response: Error occurred

Get record id

Supported only for Related list and custom button widgets.
To get record id of the record in which the widget is currently rendered, use:
ZOHO.People.API.getRecord()

Get form data by record id

To get form data by record id use:
ZOHO.People.API.getFormRecord(inputData):

 
 inputData

 JSON Input: 

 {recordId:<record id>,formName: <form name>};
 For formName - Refer here

 

Current form record id can be get from ZOHO.People.API.getRecord()

Response  

{"LabelName": value, "LabelName1":value2,"LabelName_downloadUrl":file upload field download url}

Get bulk form records

To get bulk form records, use:
ZOHO.People.API.getBulkRecords(inputData)
 inputData



 JSON Input: 
 
 {formName:<form name>,startIndex:<from limit>,limit:<to limit>}


 startIndex- not mandatory, default value -1
 limit- not mandatory, default value - 200

Response

[{"LabelName": value, "LabelName1":value2,"LabelName_downloadUrl":file upload field download url}, {"LabelName": value1, "LabelName1":value22,"LabelName_downloadUrl":file upload field download url},
]

Get form data sectionalise

To get form data by section, use
ZOHO.People.API.getFormDatabySection(inputData)
inputData
 JSON Input: 
 
 {formName:<formName>,recordId:<record id>}

For formName - Refer here

Response

[
{
"Section1": {
"Label name": value, "Label name": value
},
"Section2": {
"Label name": value, "Label name": value
},
"tabularSections": {
"Label name": [
{
"Label name": value, "Label name": value
}
],
"ApprovalStatus": "Approval Not Enabled"
}
]

Download form file

To download the form file, use:
ZOHO.People.API.downloadFormFile(inputData);
 
 inputData
 JSON Input: 
 
 {fcId:<form component id>,recordId:<form record id>,formId:<form id>}

Response

File Content

Get file categories

To get file categories, use:
ZOHO.People.API.getFileCategories();

Response

[{"CatID":"1","CatName":"Test"},{"CatID":"2","CatName":"Test1"}]

Upload employee files

To upload a file, use:
ZOHO.People.API.uploadEmployeeFile(fileInput);
 
 fileInput
 JSON Input: 
 
 {uploadfile:<Blob or file>, fileName: <File name>, employeeId:<empId>,fileDesc:   <Description>,catId:<CategoryId>};

 To get catId, use:
ZOHO.People.API.getFileCategories();

Response

Success Response: Data added successfully

Call third party APIs

To call third party APIs, use:
ZOHO.People.Http.post(requestObj);
 
 inputData
 JSON Input: 
 
 var requestObj = {
            url : url,
            header:  {'Authorization'':"Zoho-oauthtoken-__token"}
 params: {};
 };

Zoho-oauth is for invoking Zoho Services api.

Response

Response from the api.

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION











                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                            Manage your brands on social media

                                              Zoho Desk Resources

                                              • Desk Community Learning Series


                                              • Digest


                                              • Functions


                                              • Meetups


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner


                                              • Word of the Day


                                                Zoho Marketing Automation

                                                  Zoho Sheet Resources

                                                   

                                                      Zoho Forms Resources


                                                        Secure your business
                                                        communication with Zoho Mail


                                                        Mail on the move with
                                                        Zoho Mail mobile application

                                                          Stay on top of your schedule
                                                          at all times


                                                          Carry your calendar with you
                                                          Anytime, anywhere




                                                                Zoho Sign Resources

                                                                  Sign, Paperless!

                                                                  Sign and send business documents on the go!

                                                                  Get Started Now




                                                                          Zoho TeamInbox Resources



                                                                                  Zoho DataPrep Resources



                                                                                    Zoho DataPrep Demo

                                                                                    Get a personalized demo or POC

                                                                                    REGISTER NOW


                                                                                      Design. Discuss. Deliver.

                                                                                      Create visually engaging stories with Zoho Show.

                                                                                      Get Started Now









                                                                                                          • Related Articles

                                                                                                          • Custom Widget - Introduction

                                                                                                            What is a custom widget? Customize your Zoho People application user interface with custom widgets, which are embeddable user interface components that you can create and add to your Zoho People application. You can build widgets for Zoho People ...
                                                                                                          • Create Widget Using Zet-CLI Tool

                                                                                                            The Zoho Extension Toolkit (ZET) is a command-line interface designed to assist developers in creating and packaging widgets for integration with Zoho People. Prerequisites Download the nodejs source code from https://nodejs.org/en Use the following ...
                                                                                                          • Developer Space

                                                                                                            What is Developer Space in Zoho People? The developer space in Zoho People has three functionalities: View Zoho People APIs categorized by form. Create and manage Connections. Create and manage Custom Widgets. These features can help extend Zoho ...
                                                                                                          • Custom Widget

                                                                                                            Custom widgets are embeddable user interface components that you can create and add to your Zoho People application. Widgets can be used to extend the application's front-end capabilities according to your requirements. Use widgets to perform ...
                                                                                                          • Zoho People 5.0 - What has changed?

                                                                                                            Changes in Home tab and Self Service Zoho People 4.0 Zoho People 5.0 Landing page is Home > Dashboard Self Service page: New Landing page is Home > My Space > Overview (Replacement for Self service in Zoho People 4.0 with additional features). ...
                                                                                                            Wherever you are is as good as
                                                                                                            your workplace

                                                                                                              Resources

                                                                                                              Videos

                                                                                                              Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                              eBooks

                                                                                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                              Webinars

                                                                                                              Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                              CRM Tips

                                                                                                              Make the most of Zoho CRM with these useful tips.



                                                                                                                Zoho Show Resources