Storing data against entities and extensions | Online Help | Zoho Projects

Storing data against entities and extensions

Data Storage: Storing data against entities and extensions

While you build an extension for Zoho Projects, you might have to store the extension's data somewhere. We use key-value pairs to store such data against entities and extensions. Hence, the need for a traditional database like RDBMS, where the data will be stored in rows and columns, is eliminated. 

Entity Properties

What is a key-value pair?

'Key-value' is a format in which data can be stored. You can store the property or an attribute of an entity or an extension in a key-value pair.  The key will be a unique string and the value will be a JSON object. Data like session information, user profiles, and preferences can be stored as key-value pairs. You can store data against the entities we support and the extensions you develop for Zoho Projects.

Storing data against an entity

Zoho Projects supports the Project, Task and Issue entities. You will be able to store project-specific, task-specific or issue-specific data against their respective entities. The key will be a unique string and the data will be a JSON object that has to be identified with the key in the future. You can store, retrieve, update, and delete the data that you store against an entity using the following methods respectively.

If the current user has only READ access, they will be able to only retrieve the data i.e.retrieve() can only be invoked. If they have EDIT access, the other functions like 'store()', 'update()', and 'remove()' can also be invoked.

entity.store

Stores data against an entity.


var value = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample.png"}
];
var count = 1;
zohoprojects.entity.store("6573492", value, count).then(function(response)
/* Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"sample.png\"}]",
      "count" : 1,
      "id": 1587134426
    }
  ]
}
*/
); 

Arguments
Argument name Data type Description
key string

Unique string used to identify the entity property. Only this key should be used to retrieve the data later.

Note: Max length: <200> TBD

value JSONObject Property / Data that has to be stored against the entity.
count Integer Number of occurrences stored against the entity.

entity.retrieve

Retrieves the data stored against an entity. The argument of this method should be the key that was used when the same data was stored.


zohoprojects.entity.retrieve("6573492").then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"update.png\"}]",
      "id": 1587134426,
      "count: 1
    }
  ]
}
*/
);

entity.update

Updates the data that's stored against an entity. The argument of this method is a JSON object with the following four predefined keys:
Argument name Data type Description
id string The ID that was generated as the output while storing the current key against the entity using the entity.store() method.
key string The new key has to be mapped against the entity. You can also choose to retain the old/current key.
value JSON Object The data or property that has to be updated against the entity.
count Integer Number of occurrences updated against the entity.

var valueObj = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample_New.png"}
];
zohoprojects.entity.update({id:"1587134426",key:"6573492",value:valueObj,count:2}).then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"Sample_New.png\"}]",
      "id": 1587134426,
      "count" : 2
    }
  ]
}
*/
);

entity.remove

Deletes the data that's stored against a specific entity. The argument of this method is the ID that was generated as the output when the same data was stored using the 'entity.store()' method.


zohoprojects.entity.remove(1587134426).then(function(response)
/* Output
{
  "status": "success"
}
*/
);

Limitations of entity properties

  • The value stored against a key should not exceed 50KB at once.
  • This method cannot be invoked for the 'app_settings', 'attachment_picker', 'blueprint_during', and 'top_band' locations.
  • The value stored in an entity property should be in a valid JSON format.
  • Concurrent edits on an entity property don't ensure consistency. i.e, when two different users make changes to the same entity property at the same time, only the latest change will be saved and the former will be lost/overridden.

Extension property

What is an extension property?

It is a key-value pair that's stored against the extension itself. However, the data stored against an extension will be lost if the extension is uninstalled from the product. Whereas, the data stored against an entity will be retained even if the extension is uninstalled because only the extension-specific information gets deleted and the entity-specific data will still be available for the other extensions to access.

app.store

Stores data against an extension. 


var value = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample.png"}
];
zohoprojects.app.store("6573492", value).then(function(response)
/* Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"sample.png\"}]",
      "id": 1587134426
    }
  ]
}
*/
);


Arguments
Argument name Data type Description
key string Unique string used to identify the extension property.
value JSONObject Property/Data that has to be stored against the extension.

app.retrieve

Retrieves the data stored against the extension. The argument of this method should be the key that was used when the same was stored. Data could be retrieved only when this method is invoked from the extension against which it is stored. When the extension is uninstalled, the data will be deleted.


zohoprojects.app.retrieve("6573492").then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"update.png\"}]",
      "id": 1587134426
    }
  ]
}
*/
);

app.update

Updates the data that's stored against an extension. The argument of this method is a JSON object with the following predefined keys:
Argument name Data type Description
id string The ID that was generated as the output while storing the current key against the extension using the app.store() method.
key string The new key that has to be mapped against the extension. You can also choose to retain the old/current key.
value JSON Object The data or property that has to be updated against the extension.

var valueObj = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample_New.png"}
];
zohoprojects.app.update({id:"1587134426",key:"6573492",value:valueObj}).then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"Sample_New.png\"}]",
      "id": 1587134426
    }
  ]
}
*/
);

app.remove

Deletes the data that's stored against a specific extension. The argument of this method is the ID that was generated as the output when the same data was stored using the app.store() method.


zohoprojects.app.remove(1587134426).then(function(response)
/* Output
{
  "status": "success"
}
*/
);

Limitations of extension properties

  • The value stored against a key should not exceed 50KB at once.
  • A maximum of 100 key-value pairs only can be stored per extension. 
  • The value stored in an extension property should be in a valid JSON format.
  • Concurrent edits on an extension property don't ensure consistency. i.e, when two different users make changes to the same extension property at the same time, only the latest change will be saved and the former will be lost/overridden.
You can store, retrieve, update, and delete the data that you store against an extension using the following methods respectively.

    Access your files securely from anywhere

      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






                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            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

                                                                                                              • Create extensions using cloud editor

                                                                                                                Zoho Projects lets you build extensions using a cloud editor eliminating pre-setup and managing the entire development process online. Here is a webinar to help you navigate through the cloud editor. Overview Zoho Marketplace is an online store where ...
                                                                                                              • Data Administration

                                                                                                                Check your storage details, import data from other services, or take backup of your portal data. You can view the audit log of all portal activities. Storage Details Click in the upper-right corner of the top navigation band. Navigate to Data ...
                                                                                                              • Data Administration in Zoho Projects - Concept

                                                                                                                Data Administration in Zoho Projects refers to the settings related to storage, data import, data backup and Audit log within the portal. Consider a scenario where you are a project manager looking to transition from your current project management ...
                                                                                                              • Gantt Chart

                                                                                                                Gantt chart The Gantt chart displays a visual representation of your project schedule. It also shows information about the task progress, task owner, task status, and other task-related data. Feature availability: The Gantt chart is only supported in ...
                                                                                                              • HIPAA Compliance in Zoho Projects

                                                                                                                INTRODUCTION The Health Insurance Portability and Accountability Act (including the Privacy Rule, Security Rule, Breach notification Rule, and Health Information Technology for Economic and Clinical Health Act) ("HIPAA"), requires Covered Entities ...
                                                                                                                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