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

                                                                                                            • Assign values to hidden fields in native forms

                                                                                                              It would be great to be able to assign values (static or dynamic) to hidden fields in a form. Currently, I can only assign a value via the URL. I currently have a form integrated with a webhook, but I don't have a way to send useful form data as parameters,
                                                                                                            • Migrating Email Content to a Shared Mailbox Address

                                                                                                              I am moving my email to Zoho Mail (currently hosted through GoDaddy). I have created a user (me) and I have also created a "Shared Mailbox" Group (through the admin panel) with an email address I will be using as an organization address. My personal email
                                                                                                            • Calendly One-way sync- Beta Access

                                                                                                              Hello Community, Many of our Zoho Calendar users have expressed their interests in Zoho Calendar and Calendly integration. We've been tightly working on with Calendly team to provide a two-way sync between Calendly and Zoho Calendar. However, there have
                                                                                                            • Live webinar: Mastering financial presentations with Zoho Show

                                                                                                              Hey there finance professionals! We know many of you are currently knee-deep in report creation mode to wrap up the fiscal year for your organization. Creating a presentation to communicate essential financial data isn’t simple, with all the calculations,
                                                                                                            • Zoho Desk Android app update: Accessing the guided conversation bots in the IM module

                                                                                                              Hello everyone! In the latest version(v2.9.8) of the Zoho Desk Android app update, we have brought in support for Guided conversation bots within the IM Module. These bots use predefined conversation flows to automate initial responses, handle routine
                                                                                                            • Zoho Analytics Embed - Zoomed Right In?

                                                                                                              Hey all, I am using the Zoho Show app on an android TV and cannot figure out why, but the Zoho Analytics embed is zoomed right in. When I preview on my laptop it looks fine, when I go in and edit the code, it looks zoomed? Then when it displays on the
                                                                                                            • Assistance with Image File Upload in Zoho Creator

                                                                                                              Hi , I'm building an application for storyboard creation using Zoho Creator, integrating Gemini AI for automated image generation. In the "Generate Frame" form, user inputs are collected to construct image prompts. Current Workflow: On Validation (Form
                                                                                                            • Migrating all email accounts from cpanel shared hosting and email boxes to zoho

                                                                                                              I have already read previous articles posted on this forum but none of them suit my needs.So i am currently working for a small company. The company website runs on cPanel shared hosting and the company page is a WordPress website. I recently redesigned
                                                                                                            • Domain Change from apkbark.com to apkbark.io – Do I Need to Setup Zoho Mail Again?

                                                                                                              I recently migrated my website from the old domain https://apkbark.com to the new domain https://apkbark.io. The Zoho Mail setup was previously configured and working perfectly on the old domain. Now I would like to know: Will my Zoho Mail setup automatically
                                                                                                            • How to add different type of revenue under sales ?

                                                                                                              How to add different type of revenue under sales ?
                                                                                                            • Types of Revenue

                                                                                                              i have different types of revenue , I want to see under sales in different categories , while preparing invoice I want to allocated if possible
                                                                                                            • Zoho books account recovery

                                                                                                              I had submitted a request to restore zohobooks account, but I am yet to get a feedback till now. The email addresses used to access the zohobooks can not access it again. I don't know what went wrong. I need quick attention to this. More details are provided
                                                                                                            • Payments calendar for receivables and liabilities by due dates

                                                                                                              Hello guys! What method can you recommend for tracking and planning future payments against expected income? We operate on the principle - we expect some income this month, then we look at what expenses are due this month and pay accordingly. I've seen
                                                                                                            • Email Search

                                                                                                              Has search stopped working for people? Searched on Zoho email content, I get nothing back. Signed out and back in, still same issues
                                                                                                            • Zoholics Europe 2025: Your Ultimate Data Analysis (Zoho Analytics) Workshop Experience

                                                                                                              Why should you attend? This year, Zoholics Europe 2025 is putting data analysis centre stage. With a dedicated workshop designed to answer all your data-related questions, you’ll gain practical skills, real-time solutions, and expert insights that you
                                                                                                            • how i can update client_secret or refresh_token in case if my was stolen?

                                                                                                              i want to know how i can protect my data on this case
                                                                                                            • [Webinar] CoCreator – Generative AI-Assisted Application Development in Zoho Creator

                                                                                                              Hello Creators! The Zoho Developer Community is hosting a webinar on CoCreator – Generative AI-Assisted Application Development to showcase our latest AI capabilities. What's this about? It's all about our latest AI capabilities in Zoho Creator. Instead
                                                                                                            • custom fields not populating from deluge script into invoice

                                                                                                              Hello, I've created some Deluge script that is meant to take a few inputted invoice custom fields and calculate a few others. I can see when I execute the function that my inputted custom fields are being passed, yet im still ending up with all "null"
                                                                                                            • Using English But Dropdowns in Thai

                                                                                                              We have selected English in Settings but all of the dropdown boxes are in Thai. How do i change this? The organization is based in Thailand and we are using the THB as our currency, but need the dropdowns to be in English. Please help! 🙏
                                                                                                            • Introducing Import Contract API

                                                                                                              We are excited to introduce the Import Contract API in Zoho Contracts. Here's a brief overview: Import Contract API The Import Contract API allows you to import contracts directly into Zoho Contracts in any of the following states: Draft Signed Active
                                                                                                            • Cambio de Plane

                                                                                                              Tenia un plan gratuito, hice una actualización a un plan de pago, salí por completo y entre nuevamente, pero no me deja corregir, pagar o modificar las facturas que había realizado en el modo de prueba. Me da el siguiente error: Factura de proveedor se
                                                                                                            • Better integration between Zoho CRM and Zoho Bookings

                                                                                                              I've noticed that when a meeting which was created in Zoho Bookings is updated by a sales person in Zoho CRM, the change is not reflected back into Zoho Bookings. I have raised this with support who advised that meetings created in Bookings need to be
                                                                                                            • Why is there a limit to JSONString of less 100 characters

                                                                                                              having this problem.
                                                                                                            • Enhanced crash reporting in Zoho Apptics

                                                                                                              All app crashes have the same sad ending: The app dies while the user still wants to use it. But the reason behind each crash? They vary every time. Identifying the root cause and fixing it is already hard work for your dev team. What makes it harder?
                                                                                                            • Description column in the "all expenses" overview page?

                                                                                                              Hi! I'm new to Zoho Books and accounting. I'm surprised there doesn't seem to have a proper "description" field for the expenses, only "notes", and that I can't have such a description visible on the overview page. So that I can quickly visualize my expenses...
                                                                                                            • Only Default Administrator Profile can Convert Estimates Zoho Finance

                                                                                                              In Zoho Finance Only the Default Administrator Profile can convert the Estimates A different Profile with the Admin level permission cannot convert the Estimate of someone else to a Sales Order, Only and only the default Administrator Profile Why is that
                                                                                                            • Zoho Notebook suddenly running very slow on long notes

                                                                                                              I have been a longtime user of Zoho Notebook. Historically, it has run quite well, but I've noticed over the last few days that it has begun to run unbearably slow when typing in large notes, to the point where I can type four words and have to wait for
                                                                                                            • Is there a way to pass the source of the chat from SalesIQ to the CRM lead creation?

                                                                                                              Currently when I update the values of the visitor and the lead is automatically generated in the CRM it says that the lead source is Chat, but in reality it was from either Facebook, Instagram or WhatsApp. Is there a way to make sure that the correct
                                                                                                            • Imported tasks

                                                                                                              Good afternoon, I have recently setup a test instance of Zoho CRM and am currently working through a data migration from Hubspot usine the API migration tool. I needed to get a feel for how seamless this process was but I am running into an issue. It
                                                                                                            • Assigning Leads to Queues

                                                                                                              Do you support Queues as Lead Owner? This is a basic function in any CRM. Assign Lead to a Queue group where any member can take ownership by him self.
                                                                                                            • Migration of emails from Yandex to Zoho

                                                                                                              I am trying to migrate an yandex mail account to zoho mail account. I am confused with all the related articles/informations in the net. Could someone please outline the process to do it, just thinking about me as a novice with limited knowledge or experience. A couple of questions from the knowledge gained. 1. I believe we have to delete the yandex current MX from the website records and add Zoho MX. What happens to the emails as we remove the mail exchange record. Yandex stops updating emails and
                                                                                                            • 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
                                                                                                            • Zoho Sheets working offline

                                                                                                              Hi, I am looking for the ability to work offline in Zoho Sheets, but currently I cannot find the process to complete this. Does someone have any ideas or steps I might have missed? Also does Zoho Sheets have the "Format as Tables" function as is currently
                                                                                                            • Fetching whole month availability via API

                                                                                                              We are currently building a custom calendar component that books directly into our client's Zoho Bookings instance. The challenge we are facing is that your API only allows fetching availability one day at a time, which is problematic. Our second workaround
                                                                                                            • reCAPTCHA

                                                                                                              Is the Bookings form protected by reCAPTCHA, or some mechanism to ensure submission of the appointment request form is made by a human vs. bot?
                                                                                                            • Recent enhancements to Bigin's workflows and Associated Products

                                                                                                              Greetings, I hope all of you are doing well! We're happy to announce a few recent enhancements we've made to Bigin. Let's go over each one in detail. Enhancement to workflows Trigger workflows when specific fields are modified to specific values Previously,
                                                                                                            • Zoho Survey Goes to Junk Folder

                                                                                                              Hello, My company is wanting to use Zoho Survey to send out a customer satisfaction survey, and we were wondering if Zoho Campaigns allows the emails to not go into their junk folder. We sent out a test email campaign to our team and for some people it went to their inbox and for others it went to their junk folder. Is there a way to eliminate this from happening? Hope to hear from you soon! Thanks!
                                                                                                            • Nifty enhancements to Reports in Zoho CRM

                                                                                                              Dear Customers, We hope you’re well! We are here with a line of useful enhancements to Reports in Zoho CRM that are readily available to access. Include or exclude Record ID in the report export Display currency fields in record currency Capture report
                                                                                                            • need a formula to return value as shown (zoho sheet)

                                                                                                              Dear folks, What should be the formula in cell B3 to get that output, based on input sheet data.
                                                                                                            • need a formula to return value as shown (zoho sheet)

                                                                                                              Hello folks, what should be the formula in B3, to get the value shown based on input sheet ranges. thanks in advance.
                                                                                                            • Next Page