Activate Custom Layout

Purpose

To activate a previously deactivated custom layout.

Request Details

Request URL

{api-domain}/crm/{version}/settings/layouts/{layout_id}/actions/activate

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope = ZohoCRM.settings.layouts.CREATE (or)
scope = ZohoCRM.settings.layouts.ALL (or)
scope = ZohoCRM.settings.ALL 

Parameter

  • modulestring, mandatory

    Specify the module API name where you want to activate a previously deactivated layout. Use the GET Module Metadata API to get the module API names. Supported modules are Leads, Contacts, Accounts, Deals, Products, Quotes, Sales Orders, Purchase, Orders, Invoices, Campaigns, Vendors, Price Books, Cases, Solutions, and Custom.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v7/settings/layouts/5725767000002483149/actions/activate?module=Leads"
-X POST
-d "@input.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Input JSON Keys

  • profilesJSON array, mandatory

    Specify the profile IDs that should have access to the layout. Specify atleast one profile to access the layout. You can retrieve profile IDs using the GET Profiles API.

Sample Input

Copied{
    "layouts": [
        {
            "profiles": [
                {
                    "id": "5725767000000871001"
                },
                {
                    "id": "5725767000000091055"
                }
            ]
        }
    ]
}

Possible Errors

  • ALREADY_ACTIVATEDHTTP 400
    Cannot activate the active layout 
    Please specify a valid and deactivated layout ID. Use the GET Layout Metadata API to retrieve unique layout IDs. The status key in the response from the Layout Metadata API indicates whether the layout is active or inactive.
  • NOT_ALLOWEDHTTP 400
    Only profiles associated with the module can be assigned for the layout
    Resolution: Assign valid profiles to the layout.
  • MANDATORY_NOT_FOUNDHTTP 400
    Mandatory field is missing
    Resolution: Assign at least one profile to activate a layout. Use the GET Profiles API to retrieve the IDs of the Profiles.

Sample Response

Copied{
    "layouts": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5725767000002483149"
            },
            "message": "layout activated",
            "status": "success"
        }
    ]
}