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

                                                                                                            • Should I Add Leads in Bigin?

                                                                                                              ok, first off I'm new here. I just started using Bigin. I'm debating if it's appropriate to enter leads. by leads I mean a list of contacts that I have not yet reached out to...it's a cold calling list.  if I enter them I can track them (I understand
                                                                                                            • Zoho Books - Perform a validation check before an invoice is marked as sent or sent

                                                                                                              Allow the validation rules to apply to button actions. For example: an invoice could not be sent or marked as sent if it has an empty value in a custom field. (The field could remain blank while it is being worked on.)
                                                                                                            • Flow error "given url is wrong"

                                                                                                              when I setup a flow to update a task status, I get an error when it runs that says "given url is wrong."
                                                                                                            • Upgrade Zoho Desk Agent-Side Answer Bot to GenAI

                                                                                                              Hello Zoho Desk Team, We hope you're doing well. Following the recent announcements and rollout of the GenAI-based Answer Bot in Zoho SalesIQ (Nova '25), we’d like to formally request a similar upgrade for the Answer Bot used by agents inside Zoho Desk.
                                                                                                            • Bigin Android app update: Email filters enhancement, change owner for related records.

                                                                                                              Hello, everyone! In the most recent Bigin Android app update, we have introduced additional email filters and an option to change the owner of related records. Email filters: We have now brought in support for 'All Emails' and 'Added from Widgets' filter
                                                                                                            • How can I get all conversations and comments of a Zoho Desk ticket using ZOHODESK

                                                                                                              Hi everyone, Currently, I am developing a Zoho Desk extension, and I am following the guide available at https://www.zoho.com/desk/extensions/guide/#ticket-object. While working with Zoho Desk, I have noticed that I can only retrieve the general information
                                                                                                            • AI & Zoho Recruit

                                                                                                              Hello, I guess we all are using AI in our personal and professional lives. Now, let's imagine. Recruitment is just a succession of stages and steps. For which step would you like to see AI implemented into Zoho Recruit ? I'll start : - Automatic translation
                                                                                                            • Workdrive and ChatGPT Team Synced Connectors

                                                                                                              Hi, we want to be able to integrate Zoho Workdrive with OpenAI’s ChatGPT Team plan. Google Drive and OneDrive both offer this, zoho please catch up asap. We dont want to have to put our company files in google drive, we want to allow chatgpt Team edition
                                                                                                            • widget url 404'ing

                                                                                                              I'm creating a widget for the first time. When I grab the url from the base url section of the widget builder and append /widget.html it 404's Just wrote a very basic test. I have a folder structure app.zip - widget.html --js/app.js /widget.html <!DOCTYPE
                                                                                                            • Unable to Edit Pick-List Items in Custom Project Field(s)

                                                                                                              I can edit most fields normally, but if I try to edit - in any way - a Pick List field, I just get this error: To be perfectly clear, I'm trying to edit an existing Pick List field (adding or removing items), not adding a new instance. If I rename it,
                                                                                                            • How to display results from zoho.crm.searchRecords in message window

                                                                                                              Hello, I've created a custom function which is linked to a custom button which pulls a date from our contacts module and searches a date field in our quotes module and returns all records matching the date. My issue is, how to I get this to display the
                                                                                                            • Domain Transfer

                                                                                                              Hello there! I wanted to know if I can transfer my domain from Zoho to other hosting providers or use a different hosting provider instead of zoho's services.
                                                                                                            • Select CRM Custom Module in Zoho Creator

                                                                                                              I have a custom module added in Zoho CRM that I would like to link in Zoho creator.  When I add the Zoho CRM field it does not show the new module.  Is this possible?  Do i need to change something in CRM to make it accesible in Creator?
                                                                                                            • New User - Opening Stock Aging Report

                                                                                                              I am setting up new client and am entering Opening Stock - created items and entered quantity/price details. Now the aging report is showing all the opening stock as new. How do I enter the Purchase Dates of these items so that I get accurate Inventory
                                                                                                            • Bulk Receive Multiple Purchase Orders

                                                                                                              Is there a feature or function that will allow you to bulk receive issued purchase orders? I have about 100 that need to be received from 5 years ago.
                                                                                                            • Manual Invoice

                                                                                                              How to create a Manual invoice, I need to enter Amount directly instead of (qty*Rate). our company is a service sector
                                                                                                            • Effective Inbox Organization: Folders vs Tags in Zoho Mail?

                                                                                                              I'm exploring the best ways to organize a busy inbox, especially when managing multiple clients or project using Zoho Mail. I’d love to know what works best for others: 1. Do you prefer **folders** (possibly with sub-folders) for each client or project?
                                                                                                            • Merging contacts and or accounts

                                                                                                              Hello, In a prior CRM we were able to merge contacts and or accounts.  We have turned on the function to stop multiple contacts with the same email, so we can prevent multiple contacts from happening, however, we now have multiple contacts that have the
                                                                                                            • Capture Reason for absence next to Campaign Member Status. Is there a reasonable workaround?

                                                                                                              I've reviewed the topics I could find to do with this but still couldn't find anything that satisfies our requirements: We would like to track a *reason* (picklist or text, doesn't matter which) why a Campaign Member (Lead or Contact associated with a
                                                                                                            • Zoho Learning Management System - Certificate Upload by Employees

                                                                                                              We are planning to enroll employees in courses which are hosted by coursera or similar sites. I want to share the links of those courses and also want employees to upload their completion certificate once they are done. Is this function possible in
                                                                                                            • Add RTL and Hebrew Support for Candidate Portal (and Other Zoho Recruit Portals)

                                                                                                              Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to set the Candidate Portal to be Right-to-Left (RTL) and in Hebrew, similar to the existing functionality for the Career Site. Currently, when we set the Career Site
                                                                                                            • Button or Links order

                                                                                                              Is there a way to re-order the buttons or links that are created?
                                                                                                            • Adding Multiple Products (Package) to a Quote

                                                                                                              I've searched the forums and found several people asking this question, but never found an answer. Is ti possible to add multiple products to a quote at once, like a package deal? This seems like a very basic function of a CRM that does quotes but I can't
                                                                                                            • 'Pin' notes, so that specific ones are always visible at the top of the 'notes' tab.

                                                                                                              It doesn't appear Bigin has the functionality to 'pin' a note to then have it always show at the top of the notes tab section of a record. Often times we have a large number of records, but key information we may want to have easily visible to all at
                                                                                                            • Request for Subform Support in Zoho CRM Webforms

                                                                                                              Hi Team, I hope you're doing well. I would like to bring to your attention that currently, Zoho CRM Webforms do not support Subforms, which limits our ability to send forms that mirror the actual structure used within Zoho CRM. This feature is extremely
                                                                                                            • Formatting Mailing Labels

                                                                                                              I want to use the "Print Mailing Labels" function on the drop down list, but I am not seeing a way to change the formatting on the mailing labels. At the moment, the information that appears on the mailing labels ARE NOT mailing addresses, but random
                                                                                                            • Maxima Address on FSM Customer

                                                                                                              Im trying to add probably 50 customers from one company but couldn't make it since it has limit..how do i add the limit?
                                                                                                            • How to Track Inventory Usage from Zoho FSM to Zoho Inventory?

                                                                                                              Hi everyone, We’re currently working on integrating Zoho FSM with Zoho Inventory, and we’ve encountered a challenge we’re hoping the community can help us understand better. Here’s the context: When we create a Work Order in Zoho FSM that involves parts
                                                                                                            • View subform entries without viewing a record in Zoho CRM | Kiosk Studio Session #8

                                                                                                              In a nutshell Have you ever wanted to take a quick peek at a record's subform? Examples might be invoiced items in an invoice, ordered items in a sales order, or purchased items in a purchase order. Let's say you're viewing your list of invoices in Zoho
                                                                                                            • How to Create a YTD vs Last YTD Comparison Report in Zoho Analytics?

                                                                                                              Hi everyone, I'm trying to build a report that compares Year-to-Date (YTD) metrics from this year to last year. I’m struggling to get accurate results using custom formulas or aggregate functions. Has anyone successfully created a YTD vs LYTD comparison
                                                                                                            • Transforma tu Inventario: Control Inteligente y Funciones Clave en Zoho Inventory (Spanish Webinar)

                                                                                                              ¿Tu empresa necesita mayor trazabilidad y control en almacenes? Conoce cómo gestionar tu inventario con eficiencia y automatización... ¡y descubre las sorpresas que trae Zoho Analytics! Participa en nuestro webinar gratuito en español, este 19 de agosto
                                                                                                            • Dashlane discontinued its free plan: Here's why Zoho Vault's free plan is worth the switch

                                                                                                              Hey everyone, Dashlane password manager has officially announced that its free plan will be discontinued starting September 16, 2025. This change means that current free users will need to either upgrade to a paid subscription or export their data and
                                                                                                            • Mails are not being sent from custom Deluge function

                                                                                                              We are having troubles to implement sending Invoices / Sales_Orders etc. automatically using following deluge script: attachment_template_id = "aaaa"; record_id = "bbbb"; mail_template_id = "cccc"; //NEW aproach fileUrl = "https://www.zohoapis.com/crm/v8/settings/inventory_templates/"
                                                                                                            • Currency transition

                                                                                                              We are using Zoho CRM in Curacao, Dutch Caribbean. Our currency is currently the ANG. Curacao will be transition ing from using the ANG (Antillean Guilder) to using the XCG currency (Caribbean Guilder) on March 31st 2025, see: https://www.mcb-bank.com/caribbean-guilder.
                                                                                                            • Notes and Attachments visibility can now be restricted based on profiles

                                                                                                              Dear All, We hope you're well! We are here with a quick update about Notes and Attachments profile permissions. In the past, a record's Notes and Attachments were visible by default to all users with record access. However, as notes and attachments can
                                                                                                            • Zoho webinar--hard for agencies

                                                                                                              So, this is just a dive into our use case, and why we've been disappointed in Zoho webinar. We are a small marketing agency, and we wanted to add webinars to the services we provide, as many of our clients want to learn to use them as part of their content
                                                                                                            • Celebrating Raksha Bandhan with Zoho Desk: A Bond of Trust, Protection, and Service

                                                                                                              Raksha Bandhan, celebrated across India, symbolizes the sacred bond of protection and affection between siblings. “Raksha” means protection, “Bandhan” means bond or knot: together, it represents a knot of care and security. On this occasion, we'd like
                                                                                                            • Banking > Import statements with a csv file

                                                                                                              Good morning, I am regularly using the "import statement" option to match my transactions. I've been using csv files produced by my bank online and was able to import my transactions. Until now. Thank you for your help for fixing this ! Alex.
                                                                                                            • ZOHO BOOKS - RECEIVING MORE ITEMS THAN ORDERED

                                                                                                              Hello, When trying to enter a vendor's bill that contains items with bigger quantity than ordered in the PO (it happens quite often) - The system would not let us save the bill and show this error: "Quantity recorded cannot be more than quantity ordered." 
                                                                                                            • Has anyone successfully added Microsoft Graph API Oauth2 as a connection?

                                                                                                              I'm having trouble getting Microsoft Graph API created as a connection in zoho crm. Has anyone successfully added Microsoft Graph API Oauth2 as a connection? My issue is not necessarily on the Zoho side, but understanding how to set up the Microsoft side
                                                                                                            • Next Page