Record Lockings APIs in Zoho CRM

Record Lockings APIs in Zoho CRM

Hello everyone!

Welcome to Kaizen! In the previous Kaizen post, we discussed Record Locking Configuration APIs. In this post, we will discuss Record Locking APIs in Zoho CRM.
Record locking refers to the restrictions applied to a record to prevent changes to its data. Records can be locked manually or automatically. Record Locking Configuration APIs are used to set the configuration required for record locking.

Locking Information Module

When record locking configuration is enabled for any module, a new module will be created in the CRM with the API Name Locking_Information__s that contains the details related to locking information. Details related to this module can be retrieved using the Modules API (endpoint: /settings/modules) and corresponding fields can be fetched via Fields META API (endpoint: /settings/fields?module=Locking_Information__s). The fields of Locking_Information__s  module are:

Name
Data Type
Description
Locked_Reason__s  
textarea
Reason for locking the record.
Lock_Source__s
picklist
Indicates whether the record was manually locked or automatically locked. Possible values: Automatic, Manual
Locked_For__s
multi module lookup
This field contains the details of the name and id of the record which is locked and also the api_name and id of the the record's module.
Locked_Time__s
datetime
Time the record was locked.
Locked_By__s
user lookup
Details of the user who locked the record(manual locking). 
id
bigint
ID of record locking information.This id is referred as record_locking_id in the below APIs
Record_Locking_Rule_Id__s
bigint
ID of the record locking rule inside the module's record locking configuration
Record_Locking_Configuration_Id__s
bigint
ID of the record locking configuration.
Feature_Type__s
picklist
Represents feature type (possible value:record_locking)

When a record gets locked in any module, corresponding details are stored in the Locking_Information__s module as a new record.  
The ID key inside the Locked_For__s json object in Locking_Information__s module points to the locked record.

   "Locked_For__s": {
                "module": {
                    "api_name": "Deals",
                    "id": "5843104000000002181"//id of Deals module
                },
                "name": "Commercial Press",
                "id": "5843104000001068086"//id of locked record i.e.{record_id}
            }

Deleting the record inside Locking_Information__s module unlocks the locked record.
However, these actions have to be performed using Locking_Information__s Related Record APIs of the record.
URL Pattern for the same is
{api-domain}/crm/{version}/{module_api_name}/{record_id}/Locking_Information__s [POST]
{api-domain}/crm/{version}/{module_api_name}/{record_id}/Locking_Information__s/{record_locking_id}[GET/PUT/DELETE]

With this API, you can retrieve the locking information of locked records.
Request URL:
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Information__s/{record_locking_id}
OR
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Infortmation__s?fields={field_name_1},{field_name_2}

HTTP Method: GET
Please note that the fields parameter is mandatory when you are not passing the record locking id in the endpoint.

Consider that the record locking configuration for deals module is configured to automatically lock a record when it reaches the closed lost stage. A deals record in closed lost stage gets automatically locked. You can obtain the details of the locking information using this API.
Sample Request URL to fetch the locking information of a record in Deals module:
[GET] {api-domain}/crm/v5/Deals/5843104000001068077/Locking_Information__S?fields=Locked_For__s,Locked_Reason__s,Lock_Source__s,Locked_Time__s,Locked_By__s,Record_Locking_Rule_Id__s,Record_Locking_Configuration_Id__s,Owner,Parent_Id
Response Body:
{
    "data": [
        {
            "Locked_By__s": null,
            "Locked_For__s": {
                "module": {
                    "api_name": "Deals",
                    "id": "5843104000000002181"
                },
                "name": "Commercial Press",
                "id": "5843104000001068077"
            },
            "$field_states": null,
            "Locked_Reason__s": null,
            "$editable": false,
            "$sharing_permission": "read_only",
            "Lock_Source__s": "Automatic",
            "Locked_Time__s": "2023-10-23T17:46:17+05:30",
            "Record_Locking_Configuration_Id__s": "5843104000001068044",
            "Record_Locking_Rule_Id__s": "5843104000001068069",
            "id": "5843104000001072001",
            "Feature_Type__s": "record_locking",
            "$zia_visions": null
        }
    ]
}

Lock Records API

In certain scenarios, even if the record does not meet the configured locking criteria, you call the below API to manually lock it to prevent any changes to the record.
Request URL:
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Information__s
HTTP Method: POST

For instance, you are handling a deal and want to temporarily prevent any modifications to the deal information because the deal is in the last round of negotiations. You can choose to manually lock the record using the Lock Records API.
Sample Request URL for manually locking deals record: 
[POST] {api-domain}/crm/v5/Deals/5843104000001068086/Locking_Information__s
Request Body:
{
    "data": [
        {
            "Locked_Reason__s": "last round of negotiations "
        }
    ]
}

Update Record Locking Information API 

The locked reason for a manually locked record can be updated using Update Record Locking Information API.
Request URL:
{api-domain}/crm/{version}//{module_API_name}/{record_id}/Locking_Information__s/{record_locking_id}
HTTP Method: PUT

Consider that you want to modify the locked reason for the above locked record. 
Sample Request URL to modify locked reason for the above locked deal:
[PUT] {api-domain}/crm/v5/Deals/5843104000001068086/Locking_Information__s/5843104000001068094
Request Body:
{
    "data": [
        {
            "Locked_Reason__s": "awaiting final approval"
        }
    ]
}

Unlock Records API

This API can be used to unlock a manually locked record.
Request URL:
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Information__s/{record_locking_id}
HTTP Method: DELETE 

Consider that you want to unlock the above deal to move it to closed won stage. You can unlock the deal using this API.
Sample Request URL to unlock the above deal:
[DELETE] {api-domain}/crm/v5/Deals/5843104000001068086/Locking_Information__s/5843104000001068094
Response Body:
{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5843104000001068094"
            },
            "message": "relation removed",
            "status": "success"
        }
    ]
}

We hope you found this article useful. We will be back next week with another interesting topic. If you have any questions, write to us at  support@zohocrm.com  or let us know in the comment section.
Please take a look at our Kaizen collection here.

Cheers!



    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

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

                                                   
                                                    

                                                  Videos

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

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner




                                                            • Sticky Posts

                                                            • Kaizen #197: Frequently Asked Questions on GraphQL APIs

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                              Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

                                                              Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
                                                            • Kaizen #193: Creating different fields in Zoho CRM through API

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Client Script | Update - Introducing Commands in Client Script!

                                                              Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands


                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • 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


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ








                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                            • Recent Topics

                                                                                                            • Ensure Consistent Service Delivery with Comprehensive Job Sheets

                                                                                                              We are elated to announce that one of the most requested features is now live: Job Sheets. They are customizable, reusable forms that serve as a checklist for the services that technicians need to carry out and as a tool for data collection. While on
                                                                                                            • Turning off the new UI

                                                                                                              Tried the new 'enhanced' UI and actively dislike it. Anyone know how to revert back?
                                                                                                            • JOB Sheet can not send PDF as service rapports and more info needed other topic

                                                                                                              Goedendag, - Jullie hebben nu job sheet erin gedaan en dar is echt super goed, enkel kunnen we de werkbon ( JOB sheet) nu niet verzenden als PDF als een service rapport naar onze hoofdaannemer hoe we dat nu doen als bewijs van de levering van het werk
                                                                                                            • Publish a single Sheet stopped working

                                                                                                              I used to have a published sheet on my Zoho Spreadsheet and that stopped working. If I want to publish it again, I only get the message that says "Published externally", but that does nothing, and if I change tabs and come back, the sheet gives me the
                                                                                                            • Does Zoho Contracts support white-labeling?

                                                                                                              As the title says, do you provide us white-labeling solution?
                                                                                                            • Constantly getting error 429 "Too Many Requests" despite not sending many requests.

                                                                                                              I am currently working on developing an integration between our company's app and our zoho books setup using the api. When testing new functionality, I am very often having the calls fail with Error 429 'You have made too many requests continuously. Please
                                                                                                            • Not receiving emails

                                                                                                              I'm able to send emails, but I can't receive any. Please help
                                                                                                            • Capturing knowledge across many channels

                                                                                                              We actively use Cliq for client discussions, product management etc. Often there are great answers to questions or key announcements. We have no way to tag or capture them along the way. Pinning only gets us so far. For example, imagine a product channel
                                                                                                            • Prepayment of a sales order

                                                                                                              How does everyone handle this common (at least it is common for us!) situation? We require all our orders to be fully prepaid before shipment since we manufacture made to order, custom products. Since ZOHO does not allow a sales order to be prepaid, we are forced to create an invoice at the time an order is placed to allow the customer to pay it. Our sales category is therefore skewed, since the sale was actually booked at the time an order was placed, rather then at the time it is shipped, which
                                                                                                            • Zoho Campaigns Account Keeps Shutting Down

                                                                                                              Hey hey, I am completely at a loss here. For months we have been back and forth with Zoho Campaigns Support on Spam Trap hits. Each time they can never provide us with a full list of emails, only 1 here or there. So internally we have setup a integration
                                                                                                            • Need a way to run a client script longet than 10 seconds

                                                                                                              By The Grace of G-D. Hi, Currently, Client Scripts are Timing out at 10 seconds. We have complex logics that needs more time. Can you add a feature request to increase the timeout?
                                                                                                            • Last activity time is acting like last modified time

                                                                                                              When i edit the description or any field in the potential, account, contact and lead, the Last Activity Time is being updated like the Modified Time. This is messing all workflows and reports and we are unable to track real last time of activities like mentioned in this KB article http://crmkbase.zoho.com/what-is-the-difference-between-record-modified-time-and-record-last-activity-time
                                                                                                            • Can multiple agents be assigned to one ticket on purpose?

                                                                                                              Is it possible to assign one ticket to two or more agents at a time? I would like the option to have multiple people working on one ticket so that the same ticket is viewable for those agents on their list of pending tickets. Is something like this currently
                                                                                                            • What’s New in 2025 (So Far)

                                                                                                              Hey Recruiters, We’ve wrapped up the first half of 2025 with a few focused enhancements in Zoho Recruit—all aimed at simplifying your day-to-day recruitment tasks. Here’s a quick video that walks you through what’s new so far this year: Here’s a brief
                                                                                                            • Zoho Pagesense really this slow??? 5s delay...

                                                                                                              I put the pagesense on my website (hosted by webflow and fast) and it caused a 5s delay to load. do other people face similar delays?
                                                                                                            • Multi-Department Approval for a Single Bill in Zoho Books

                                                                                                              Hello everyone, Hope you're all doing well. I’d like to ask if anyone has found a good workaround for the following scenario in Zoho Books: Let’s say a corporate credit card bill or vendor invoice covers multiple purchases across different projects or
                                                                                                            • Zoho Landing Page "Something went wrong" Error

                                                                                                              Hello, Every time I try to create a new landing page, I receive a "Something went wrong" error with no explanation. I cannot create any new pages, which means we cannot use this application. I did create one landing page successfully over a month ago,
                                                                                                            • Composite items are not seen in zoho commerce

                                                                                                              Composite items are not seen in zoho commerce. Are you scheduled to fix this error?
                                                                                                            • not able to access Zoho from home WIFI

                                                                                                              for some reasone i am not able to access Zoho on my laptop or my iphone while i am connected to my home Wifi, i am able to access these sites both on laptop as well as Iphone and associated apps on any other Wifi as well as when I am on my 4G connection
                                                                                                            • Zoho Books for Service Enterproses

                                                                                                              I would like to know how to use Zoho Books for services such as car rental, travel agency, and hotel services. I notice that Zoho Books is good for goods, but for services, it's very difficult to track the profit or loss on each invoice. I need to capture
                                                                                                            • Email Relay in Zoho Books

                                                                                                              I have set up the email relay in Zoho books and the SMTP test was successful. However, I can't figure out how to sent the POs and invoices via the relay so the copy of the message shows in google workspace sent mail. Any guidance is appreciated
                                                                                                            • E-invoicing/Facturacion Electronica in Peru, SUNAT authority

                                                                                                              Hi Zoho, you are promoting your product very actively in south america as well as in Peru, but since few years there is an obligation for e-invoicing, transmitting information directly to peruvian tax authority SUNAT. Do you have any solution for this?
                                                                                                            • Project Accounting

                                                                                                              Hello Zoho, Can we also bring project accounting in Zohobooks as a ne feature in upcoming developments? This will be helpful for specific business and industries. Thanks
                                                                                                            • Accounts Payable

                                                                                                              hi there  i am using the free version to trial the software. I am working on the acrual basis. When i received a vendor invoice, it gets keyed into the systems as an unpaid invoice as the payment to from the vendor is 14 days. the unpaid invoice does
                                                                                                            • Approval Processes "Record Modification"

                                                                                                              I didn't find any information about the "Record Modification" item in Zoho articles and Tutorials. I see that this item didn't exist a year ago. Help understand how it works, I tested it and didn't see any difference between "all fields" and "no fie
                                                                                                            • How do i add another purchase information heading?

                                                                                                              i would like to add another section right here to enter an amount which then link directly to the cost of goods sold account
                                                                                                            • Help with Zoho CRM API Integration in C# WinForms (Token Generation Issue)

                                                                                                              Hi everyone, I need your help with integrating the Zoho CRM API into a C# desktop application. My goal is to build a WinForms app in Visual Studio that does the following: Fetch the full list of client projects (module: Deals) and display them in a searchable
                                                                                                            • Can we share the URL of My zoho Sheets on other websites?

                                                                                                              Hello everyone? I have sheets on Zoho and I want to share them on other websites like daraz, homeshopping, gepco duplicate bills, etc. I don't have much knowledge about online sharing question forums? I am a student and have a short survey about online
                                                                                                            • Add Support to Upload Inventory Items with Categories or Enable Separate Upload for Inventory Categories

                                                                                                              Currently, Zoho Inventory does not support uploading new items along with their parent and sub inventory categories using the item import feature. This creates challenges for businesses with structured inventory hierarchies when trying to upload items
                                                                                                            • in zoho books while categorizing need to add new name in category by replacing expanses how to edit or make changes need assistance

                                                                                                            • Tip of the Week #62– Use @mentions to loop in teammates.

                                                                                                              Ever been stuck on a customer query because you needed input from someone else on your team? Maybe you were unsure about a refund policy or needed help answering a technical question. So you forward the message … and wait. Or worse, you forget to follow
                                                                                                            • Suggestions for Kiosk Functionality Improvements in Zoho People

                                                                                                              Hello Zoho Team, I’d like to share some feedback and suggestions regarding the Kiosk functionality in Zoho People, as there are two important points that affect user experience and compliance: Visual Confirmation of Check-In Status It would be extremely
                                                                                                            • Needs Separate Permissions levels for Record Attachments

                                                                                                              Currently in Zoho Books Record attachments are tied to the general permission level For example if a role don't have the delete permission level they cannot delete the attachment as well If a role doesn't have the edit permission they cannot upload the
                                                                                                            • Zoho Books integration with Google workspace

                                                                                                              How do I integrate Zoho books with Google Workspace? The steps outlined on the Zoho help sections do not correspond to the actual user interface in Google Workspace. Zoho books is installed on admin level for all users, all users can access it from the
                                                                                                            • Fields of Look up in Custom Modules

                                                                                                              We need to create a custom module in Books for Proforma Invoices Now I created a Custom Module and added a Table and in the table added a lookup field and chose Items Now I want Specific fields of the item such as Tax, Item Cost etc but it only displays
                                                                                                            • Share work items across projects and users

                                                                                                              Hello everyone, We're thrilled to introduce a new feature in Zoho Sprints: "Share work item" Collaboration across projects and users is now easier with the introduction of the Share work item feature. You can now share work items with users who are not
                                                                                                            • Payment Terms Changing Upon Invoicing

                                                                                                              Hello! Our standard payment terms for 95% of our customers are Net 30, and all of our customers that these terms apply to have that setting n their customer profile. However, over the last week or so, when an invoice is generated the majority of these
                                                                                                            • How do I get a refund for email seats?

                                                                                                              Hi, I've been using Zoho for awhile and have been paying for 2 seats. Recently, I created another 9 seats, but I also found out that Zoho does not support cold emails, so these 9 seats created for this purpose became useless. It's within 24 hours that
                                                                                                            • Work Orders / Bundle Requests

                                                                                                              Zoho Inventory needs a work order / bundle request system. This record would be analogous to a purchase order in the purchasing workflow or a sales order in the sales cycle. It would be non-journaling, but it would reserve the appropriate inventory of
                                                                                                            • Narrative 1 - The significance of a business account

                                                                                                              Behind the scenes of a successful ticketing system - BTS Series Narrative 1 - The significance of a business account Setting up a proper business account is a crucial step that is often overlooked when launching a ticketing system for your service company,
                                                                                                            • Next Page