Record Locking Configuration APIs
Record locking configuration allows you to set up the configuration needed to lock the records in modules manually or automatically when certain conditions are met.
GET Record Locking Configuration
Purpose
To retrieve the record locking configuration for different modules.
Endpoints
- GET /settings/record_locking_configurations?module={module_API_name}
Request Details
Request URL
{api-domain}/crm/{version}/settings/record_locking_configurations?module={module_API_name}
Supported modules
Leads, Contacts, Accounts, Deals, Quotes, Sales Orders, Purchase Orders, Invoices, Vendors, Price Books, Cases, Solutions, Tasks, Products and custom modules
Note
- For custom modules, only those created by users will support record locking. Custom modules created through extensions, integrations, or other means are not supported.
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.record_locking_configurations.Read
(or)
ZohoCRM.settings.record_locking_configurations.ALL
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/record_locking_configurations?module=Leads"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GETParameters
- modulestring, mandatorySpecify the API name of the required module to retrieve record-locking configuration with respect to that module. 
- feature_typestring, optionalUse this parameter for filtering the required record-locking configurations. 
 Possible values: record_locking
Response JSON
- created_time stringRepresents the date and time at which the record-locking configuration was created. 
- locked_for stringRepresents whether records are locked for all profiles or all profiles with a few exceptions. 
 Possible values: all_profiles_except_excluded_profile, all_profiles
- excluded_fieldsJSON ArrayRepresents the fields that are excluded from record locking - api_namestringRepresents the API name of the fields that are excluded from record locking. 
- id longRepresents the ID of the fields that are excluded from record locking. 
 
- created_byJSON ObjectRepresents the name and ID of the user who created the record locking configuration. - name stringRepresents the name of the user who created the record locking configuration. 
- idlongRepresents the ID of the user who created the record locking configuration. 
 
- feature_typestringRepresents the feature type of record locking configuration. 
- locking_rules JSON ArrayRepresents the details of rules added to lock the records in the module automatically. - namestringRepresents the name of the record locking rule 
- idlongRepresents the ID of the record locking rule. 
- lock_existing_recordsbooleanIndicates whether the existing record must be locked or not. 
- criteriaJSON ObjectSpecifies the criteria for record locking rule. - group_operatorstringSpecifies the group operator used in the criteria. 
 Possible values: AND, OR
- groupJSON ArrayRepresents the group of criteria for the record locking rule. - comparatorstringRepresents the comparison operator used in the criteria. 
- fieldJSON ObjectRepresents the field details for the criteria. - api_namestringSpecifies the API name of the field. 
- idlongSpecifies the ID of the field. 
 
- valuestringSpecifies the value used in the criteria. 
 
 
 
- restricted_actionsJSON ArraySpecifies the actions that are restricted for locked records. 
- lock_for_portal_usersbooleanIndicates whether locked records are restricted for portal users as well. 
- modified_timestringRepresents the date and time at which the record-locking configuration was modified. 
- restricted_communicationsJSON ArraySpecifies types of communication that are restricted for locked records. 
- system_definedbooleanIndicates whether the record configurations are system defined. 
- modified_byJSON ObjectRepresents the name and ID of the user who modified the record locking configuration. - name stringRepresents the name of the user who modified the record locking configuration 
- idlongRepresents the ID of the user who modified the record locking configuration. 
 
- lock_typestringRepresents the type of the record locking configuration. 
 Possible values: manual, automatic, both
 When lock type is automatic, records will be locked automatically when the criteria for locking is matched. When lock type is manual, users with lock permissions in their profile can lock records manually.
- restricted_custom_buttonsJSON ArrayRepresents the custom buttons that are restricted for locked records. - namestringRepresents the API name of the custom buttons that are restricted for locked records. 
- idlongRepresents the ID of the custom buttons that are restricted for locked records. 
 
- lock_excluded_profilesJSON ArrayRepresents the profiles that are restricted from locking. - api_namestringRepresents the API name of the profiles that are restricted from locking. 
- idlongRepresents the ID of the profiles that are restricted from locking. 
 
Possible Errors
- NO_CONTENTHTTP 204Record locking configuration is not configured in your org. 
 Resolution: Configure record locking configuration in your org.
- REQUIRED_PARAM_MISSINGHTTP 400One of the expected parameters is missing. 
 Resolution: The "details" key in the response gives the missing param in the request. Ensure that you include the params marked "mandatory" in the "Parameters" section.
- INVALID_MODULEHTTP 400The module name given seems to be invalid. 
 Resolution: Specify a valid module API name.
- NOT_SUPPORTEDHTTP 400The module name given is not supported for the feature. 
 Resolution: Specify a supported module API name.
- INVALID_DATAHTTP 400The id given seems to be invalid. 
 Resolution: Specify a valid record config id.
- FEATURE_NOT_SUPPORTEDHTTP 400Record Locking Configuration is not supported in your edition. 
 Resolution: Contact your administrator.
- INVALID_REQUEST_METHODHTTP 403The HTTP request method type is not a valid one. 
 Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section at the beginning of the page.
- INTERNAL_ERRORHTTP 500Internal Server Error. 
 Resolution:Unexpected and unhandled exception in the server. Contact support team.
Sample Response
Copied{
    "record_locking_configurations": [
        {
            "created_time": "2023-08-26T18:11:14-04:00",
            "locked_for": "all_profiles",
            "excluded_fields": [
                {
                    "api_name": "Description",
                    "id": "5843104000000002645"
                }
            ],
            "created_by": {
                "name": "Patricia Boyle",
                "id": "5843104000000424672"
            },
            "feature_type": "record_locking",
            "locking_rules": [
                {
                    "name": "lead conversion rule",
                    "id": "5843104000000820017",
                    "lock_existing_records": false,
                    "criteria": {
                        "comparator": "greater_than",
                        "field": {
                            "api_name": "Lead_Conversion_Time",
                            "id": "5843104000000280013"
                        },
                        "value": "10"
                    }
                },
                {
                    "name": "Last activity rule",
                    "id": "5843104000000820018",
                    "lock_existing_records": false,
                    "criteria": {
                        "group_operator": "AND",
                        "group": [
                            {
                                "comparator": "less_than",
                                "field": {
                                    "api_name": "Last_Activity_Time",
                                    "id": "5843104000000052001"
                                },
                                "value": "2018-09-01T01:00:00-04:00"
                            },
                            {
                                "comparator": "less_than",
                                "field": {
                                    "api_name": "Created_Time",
                                    "id": "5843104000000002627"
                                },
                                "value": "2018-09-01T01:00:00-04:00"
                            }
                        ]
                    }
                }
            ],
            "restricted_actions": [
                "update",
                "tags",
                "convert",
                "delete",
                "change_owner"
            ],
            "lock_for_portal_users": true,
            "modified_time": "2023-09-07T22:31:35-04:00",
            "restricted_communications": [
                "send_mail"
            ],
            "system_defined": false,
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "5843104000000424672"
            },
            "id": "5843104000000758004",
            "lock_type": "both",
            "restricted_custom_buttons": [
                {
                    "name": "Send with Zoho Sign",
                    "id": "5843104000000485570"
                },
                {
                    "name": "Send with Zoho Sign",
                    "id": "5843104000000485606"
                }
            ],
            "lock_excluded_profiles": null
        }
    ]
}