Perform Field Updates during Blueprint transition via Client Script

Perform Field Updates during Blueprint transition via Client Script



Hello everyone!

Welcome back to another exciting Kaizen post.
One of the questions we received through your Kaizen feedback was: 

“How can I update fields before Blueprint transition and how to prevent a transition based on a condition using Client Script?”

 In today’s post, let’s walk through how to achieve this with a simple real-world example. 
We have previously explored how to use Blueprint Events in this Kaizen post and how to implement custom validations within a Blueprint in another Kaizen post.
In this Kaizen post, 


In this Kaizen post, 

1. Use Case
        A. Field Update during Blueprint Transition
        B. Prevent Transition
2. Solution
3. Summary
4. Related Links



1. Use Case

Lisa, the CRM Admin at Zylker, wants to enhance the Lead follow-up Blueprint by capturing the reason behind each transition. Before any transition, a popup should prompt the user to enter a comment.

Field Update:
The Description field should act as the comment history for all Blueprint transitions. When a user enters a comment during a transition, the system should append the comment along with the transition name and the user’s name to this field if the comment has more than 25 characters.

Prevent Transition:
If the comment is less than 25 characters, the transition should be prevented.

2. Solution: 

  • To achieve this, you should create a Client Script that runs during the beforeTransition Blueprint event in your Blueprint.
  • The Before Transition event allows you to control what happens just before a Blueprint transition is executed, and this is perfect for tasks like validating inputs or updating fields dynamically.
  • Go to Setup > Developer Space > Client Script. 
  • Click +New Script.
  • Specify the details to create a script and click Next.
  • Enter the following script and click Save.

  1. // Show a popup input asking the user to enter comments
  2. var notes_pop_up = ZDK.Client.getInput(
  3.     [{ type: 'text', label: 'Comments' }], // Input type and label
  4.     'Deal',                                // Title of the popup
  5.     'OK',                                  // Confirm button text
  6.     'Cancel'                               // Cancel button text
  7. );

  8. // Get the "Description" field from the current record
  9. var notes_field = ZDK.Page.getField("Description");

  10. // Check if the input comment length is greater than 25 characters
  11. if (notes_pop_up.length > 25) {

  12.     // If the Blueprint transition is "Gather Details", create a new description with just this comment
  13.     if (transition.name == "Gather Details") {
  14.         var desc = transition.name + "- " + notes_pop_up + ",";
  15.     } 
  16.     // For other transitions, append the new comment to the existing description along with the user name
  17.     else {
  18.         var desc = notes_field.getValue() + " ,\n '" + transition.name + "' - " + notes_pop_up + " - " + $Crm.user.full_name;
  19.     }

  20.     // Fetch the Lead record using the record ID from the page
  21.     var lead = ZDK.Apps.CRM.Leads.fetchById($Page.record_id);

  22.     // Update the Description field of the lead
  23.     lead.Description = desc;

  24.     // Save the updated lead record
  25.     var response = ZDK.Apps.CRM.Leads.updateById(lead, $Page.record_id);

  26. // If comment length is less than or equal to 25 characters, prevent the transition
  27. else {
  28.     ZDK.Client.showAlert("Enter minimum of 25 characters to proceed");
  29.     return false; // Block transition
  30. }

  • To prompt the user for comments during a Blueprint transition, use ZDK.Client.getInput(), which displays a popup input box.
  • The existing value of the Description field can be fetched using ZDK.Page.getField("Description").
  • To retrieve full lead details based on the current record, call ZDK.Apps.CRM.Leads.fetchById() using $Page.record_id.
  • Once the new comment is prepared, update the lead by calling ZDK.Apps.CRM.Leads.updateById().
  • If the entered comment is too short (e.g., under 25 characters), the code displays an alert using ZDK.Client.showAlert() to guide the user.
  • The user’s full name is accessed via $Crm.user.full_name.
  • Finally, return false will stop the Blueprint transition if the number of characters is less than 25.
  • Here is how the Client Script works if the user specifies a description with sufficient length.


  • As you can see in the following gif, if the user enters a short description, the Client Script shows an alert and prevents the Blueprint transition.



We hope you found this post useful. We will meet you next week with another interesting topic!
If you have any questions, let us know in the comment section.
Click here for more details on Client Script in Zoho CRM.

3. Summary

A. How can I update fields during a Blueprint transition using Client Script
B. How to prevent Blueprint transition

4. Related Links

Best practices of Client Script 

Happy Client Scripting!


      • 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

        • Recent Topics

        • Systematic SPF alignment issues with Zoho subdomains

          Analysis Period: August 19 - September 1, 2025 PROBLEM SUMMARY Multiple Zoho services are causing systematic SPF authentication failures in DMARC reports from major email providers (Google, Microsoft, Zoho). While emails are successfully delivered due
        • Cannot update Recurring_Activity on Tasks – RRULE not accepted

          Hello, I am trying to update Tasks in Zoho CRM to make them recurring yearly, but I cannot find the correct recurrence pattern or way to update the Recurring_Activity field via API or Deluge. I have tried: Sending a string like "RRULE:FREQ=YEARLY;INTERVAL=1"
        • Update application by uploading an updated DS file

          Is it possible? I have been working with AI on my desktop improving my application, and I have to keep copy pasting stuff... Would it be possible to import the DS file on top of an existing application to update the app accordingly?
        • Minimise chat when user navigates to new page

          When the user is in an active chat (chatbot) and is provide with an internal link, when they click the link to go to the internal page the chat opens again. This is not a good user experience. They have been sent the link to read what is on the page.
        • Image Upload Field | Zoho Canvas

          I'm working on making a custom view for one of our team's modules. It's an image upload field (Placement Photo) that would allow our sales reps to upload a picture of the house their working on. However, I don't see that field as a opinion when building
        • Reports: Custom Search Function Fields

          Hi Zoho, Hope you'll add this into your roadmap. Issue: For the past 2yrs our global team been complaining and was brought to our attention recently that it's a time consuming process looking/scrolling down. Use-case: This form is a service report with
        • Zoho Projects app update: Voice notes for Tasks and Bugs module

          Hello everyone! In the latest version(v3.9.37) of the Zoho Projects Android app update, we have introduced voice notes for the Tasks and Bugs module. The voice notes can be added as an attachment or can be transcribed into text. Recording and attaching
        • zurl URL shortener Not working in Zoho social

          zurl URL shortener Not working in while creating a post in Zoho social
        • In the Zoho CRM Module I have TRN Field I should contain 15 digit Number , If it Contain less than 15 digit Then show Alert message on save of the button , If it not contain any number not want to sh

          Hi In the Zoho CRM Module I have TRN Field I should contain 15 digit Number , If it Contain less than 15 digit Then show Alert message on save of the button , If it not contain any number not want to show alert. How We can achive in Zoho CRm Using custom
        • Power of Automation::Streamline log hours to work hours upon task completion.

          Hello Everyone, A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:-
        • Zoho Bookings know-how: A hands-on workshop series

          Hello! We’re conducting a hands-on workshop series to help simplify appointment scheduling for your business with Zoho Bookings. We’ll be covering various functionalities and showing how you can leverage them for your business across five different sessions.
        • Custom report

          Hello Everyone I hope everything is fine. I've tried to To change the layout of the reports, especially the summary page report, and I want to divide summary of each section in the survey but I can't For example: I have a survey containing five different
        • Zoho Journey - ZOHO MARKETING AUTOMATION

          I’ve encountered an issue while working with a journey in Zoho Marketing Automation. After creating the journey, I wanted to edit the "Match Criteria" settings. Unfortunately: The criteria section appears to be locked and not editable. I’m also unable
        • How to create a Service Agreement with Quarterly Estimate

          Hello, I'm not sure if this has been asked before so please don't get mad at me for asking. We're an NDIS provider in Australia so we need to draft a Service Agreement for our client. With the recent changes in the NDIS we're now required to also include
        • Change Currency symbol

          I would like to change the way our currency displays when printed on quotes, invoices and purchase orders. Currently, we have Australian Dollars AUD as our Home Currency. The only two symbol choices available for this currency are "AU $" or "AUD". I would
        • Python - code studio

          Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
        • How to update Multiple Users field in Quote Module from Deal Module

          Scenario : Deal Module having Multiple User Field (Presales Engineer) which having more than 1 User and through Deluge Script I need to get that Users Details and need to put into Multiple User Field (Presales Engineer) of Quote Module. Note: Both Module
        • Generate a link for Zoho Sign we can copy and use in a separate email

          Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
        • Auto-sync field of lookup value

          This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
        • Zoho Social - Post Footer Templates

          As a content creator I often want to include some information at the end of most posts. It would be great if there was an option to add pre-written footers, similar to the Hashtag Groups at the end of posts. For example, if there is an offer I'm running
        • How do you list multiple contacts for a lead?

          My sales team wants to be able to add additional contacts for leads, how do we do that? Is there a different way we should be using the lead / contact functionality?
        • Field Not Updating in FSM Script - Service and Parts module.

          Dear Team, I am reaching out regarding a script I have implemented in Zoho FSM to automate the calculation of the End of Service date based on the End of Sale date in the Service and Parts module. Overview of the script: Fetches the End_of_Sale__C and
        • Supervisor Rules - Zoho Desk

          Hi, I have set up a Supervisor Rule in Zoho Desk to send an email alert when a ticket has been on hold for 48 hours. Is there a way to change it so that the alert only sends once and not on an hourly basis? Thank you Laura
        • Seriously - Create multiple contacts for leads, (With Company as lead) Zoho CRM

          In Zoho CRM, considering a comapny as a lead, you need us to allow addition of more than one contact. Currently the Lead Section is missing "Add contact" feature which is available in "Accounts". When you know that a particular lead can have multiple
        • The Social Wall: August 2025

          Hello everyone, As summer ends, Zoho Social is gearing up for some exciting, bigger updates lined up for the months ahead. While those are in the works, we rolled out a few handy feature updates in August to keep your social media management running smoothly.
        • Ugh! - Text Box (Single Line) Not Enough - Text Box (Multi-line) Unavailable in PDF!

          I provide services, I do not sell items. In each estimate I send I provide a customized job description. A two or three sentence summary of the job to be performed. I need to be able to include this job description on each estimate I send as it's a critical
        • ZOHO BOOKS - EXCESSIVELY SLOW TODAY

          Dear Zoho Books This is not the first time but it seems to be 3 times per week now that the system is extremely slow. I work on Zoho Books 95% of my day so this is very frustrating. Zoho you need to do something about this. I have had my IT guy check
        • Allow to pick color for project groups in Zoho Projects

          Hi Zoho Team, It would be really helpful if users could assign colors to project groups. This would make it easier to visually distinguish groups, improve navigation, and give a clearer overview when managing multiple projects. Thanks for considering
        • Zoho Books - Quotes to Sales Order Automation

          Hi Books team, In the Quote settings there is an option to convert a Quote to an Invoice upon acceptance, but there is not feature to convert a Quote to a Sales Order (see screenshot below) For users selling products through Zoho Inventory, the workflow
        • Zoho Books - Hide Convert to Sales Order if it can't be used.

          Hi Books team, I noticed that it is not possible to convert a Quote to a Sales Order when a Quote is not yet marked as accepted. My idea is to not show the Convert to Sales Order button when it is not possible to use it, or show it in a grey inactive
        • Can't find imported leads

          Hi There I have imported leads into the CRM via a .xls document, and the import is showing up as having been successful, however - when I try and locate the leads in the CRM system, I cannot find them.  1. There are no filters applied  2. They are not
        • Custom Button Disappearing in mobile view | Zoho CRM Canvas

          I'm working in Zoho CRM Canvas to create a custom view for our sales team. One of the features I'm adding is a custom button that opens the leads address in another tab. I've had no issue with this in the desktop view, but in the mobile view the button
        • The connected workflow is a great idea just needs Projects Integrations

          I just discovered the connected workflows in CRM and its a Great Idea i wish it was integrated with Zoho Projects I will explain our use case I am already trying to do something like connected workflow with zoho flow Our requirement was to Create a Task
        • Rich Text For Notes in Zoho CRM

          Hello everyone, As you know, notes are essential for recording information and ensuring smooth communication across your records. With our latest update, you can now use Rich Text formatting to organize and structure your notes more efficiently. By using
        • Clone a Module??

          I am giong to repurpose the Vendors module but would like to have a separate but very similar module for another group of contacts called Buyers. I have already repurposed Contacts to Sellers. Is it possible to clone (make a duplicate) module of Vendors
        • Updating Subform Record from other Form

          Just wanted to ask how to properly approach this. I have 2 forms and would like to trigger an auto update on the subform once record submitted. block below only updates 1 row for each recordRow in input.AV_System { AssetRecord = Site_Asset_Services[SOR_No
        • Zoho Projects MCP Feedback

          I've started using the MCP connector with Zoho Projects, and the features that exist really do work quite well - I feel this is going to be a major update to the Zoho Ecosystem. In projects a major missing feature is the ability to manage, (especially
        • Function #10: Update item prices automatically based on the last transaction created

          In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
        • New Mandatory One-Click Unsubscribe Link Overshadowing Custom Unsubscribe Link

          I was recently informed by Zoho CRM Support that they are now mandated by the large email service providers like Google and Yahoo to provide a one-click unsubscribe option in the header (not the body) of all mass emails. I have a custom unsubscribe link
        • Office 365 and CRM mail integration: permission required

          Has anyone run into this weird problem? My email server is Office 365. When I try to configure Zoho CRM to use this server, a Microsoft popup window opens requesting user and password. After entering that, I get a message in the Microsoft window saying
        • Next Page