Deploy Client Script in various places
Such as
-> On_Load/On_Save/On_Edit of Page, On_Type/On_Change of Field, Subform Events, Blueprint Events, List View Events, etc.
-> Commands/Shortcut Keys (Trigger script from anywhere & anytime in CRM).
-> Custom Button (Recent Enhancement)
Please refer to the following Help Reference to know more about Client Script Events Details.
To Create Client Script:
You could add Client Script through two ways:
1. Through Setup Page:
Navigate to Setup (⚙️) in Zoho CRM >> Developer Hub >> Client Script >> New Script.
-> Provide a Name & Description appropriate to script
-> Category Details -
- Select Category based on requirement. Module - triggers via Events || Commands - triggers via Command Pallet/Shortcut Keys.
- Choose Module where you want to add script. i.e., Lead, Contact, etc.
- Choose Page to deploy script in specific page. i.e., Create, Edit, Clone, Detail, List, etc.
- Choose Layout. i.e., Standard or Custom layouts.
-> Event Details -
Select Event Type - Field Event or Page Event or Subform Event
- Field Event -> Select the Field & Event (i.e., onChange on First Name field).
- Page Event -> Select the Page & Event (i.e., onLoad on Create Page).
- Subform Event -> Select the Subform & Event (i.e., onCellChange).
2. Through Detail/List/Create/Edit/Clone Pages of a Record in Module
-> Choose a desired module in Zoho CRM, and open either the List, Create, Detail, Edit or Clone page of any record in that module. For example, consider the Create Lead page.
-> For Pages (such as Create/Edit/Clone) - In the right-most corner of the page, click Client Script. Then, Add script.
-> The Category details will be pre-populated by the system. Fill in the other details of the client script, such as Name, Description, Event Details of the client script. Further, click next and add your script to the code editor in Client Script IDE. Then click Save and Close.
Add Client Script via Detail Page:
Add Client Script via Different Pages such as List/Create/Edit/Clone: