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

    • Deluge Script: Onboarding → Access Form

      Hello everyone, Edit: Sorry, I think I put this topic in the wrong section. I’ve recently run into an issue that’s been giving me a bit of a headache for the past few weeks. Context: This is my first time using Deluge to create a script, but it’s not
    • How can I optimize a Zoho Site page for SEO when embedding external menu or restaurant links?

      Hi everyone, I’m experimenting with building small content hubs on Zoho Sites and want to make sure I’m doing it in an SEO-friendly way. For example, I tried creating a page that highlights restaurant menu items and linked out to a resource like this:
    • Diff signature for compose new email and replies

      Hi,   How do i have different signature for replies and new emails. its inconvenient to have one large signature for replies. Usually on Outlook we have the option to keep separate signatures for new emails and for replies.
    • Zoho Website Site Speed Up & Setting

      We are experiencing slow loading speeds on our Zoho website and would like assistance in optimizing its performance. Kindly review the site and suggest or implement necessary improvements to enhance speed, especially related to: > Caching mechanisms >
    • Clickjacking: Zoho Vault's Response

      Issue Password manager browser extensions are found vulnerable to clickjacking security vulnerabilities that could lead attackers to steal account credentials, TFA codes, card details, under certain conditions. Reported by Marek Toth, Independent Security
    • Optimize your Knowledge Base for better visibility by allowing search engine crawling and indexing

      All you need to know about no-follow and no-index in KB. What are article crawlability and indexability? Crawlability and indexability are vital for making an article visible and accessible to search engines. When a search engine crawls an article, it
    • No option for pick up in Zoho Books / Inventory but yes on commerce

      Is it planned to release soon on books/inventory?
    • Archiving Contacts

      How do I archive a list of contacts, or individual contacts?
    • Zoho Books - France

      L’équipe de Zoho France reçoit régulièrement des questions sur la conformité de ses applications de finances (Zoho Books/ Zoho Invoice) pour le marché français. Voici quelques points pour clarifier la question : Zoho Books est un logiciel de comptabilité
    • Blueprint Issue - Being able to set a subform field as mandatory

      I'm creating a blueprint. My record involves a subform which is only shown once field is set but the field gets set in step two of the process. My problem - I can't save the record as the subform field is set to mandatory - If I unset the mandatory field,
    • Blueprint - Mandatory file upload field

      Hi, File upload (as we as image upload) field cannot be set as mandatory during a blueprint transition. Is there a workaround? Setting attachments as mandatory doesn't solve this need as we have no control over which attachments are added, nor can we
    • Has anyone created a public ASAP Guide that I can check out?

      I am thinking of adding an ASAP guide to my web application, but I have noticed that the ASAP widget itself can be really slow to load sometimes. Has anyone created a public ASAP Guide that I can check to see how performant it is? I don't want to spend
    • Zoho Books - Include Quote Status in Workflow Field Triggers

      Hi Zoho Books team, I recently tried to create a Workflow rule based on when a Quote is Accepted by the customer. This is something which I thought would be very easy to do, however I discovered that Status is not listed as a field which can be monitored
    • Zoho Books - Show Related Sales Orders on Quotes

      Hi Books team, I've noticed that the Quotes don't show show the related Sales Order. My feature request is to also show related Sales Orders above the Quote so it's easy to follow the thread of records in the sales and fulfilment process. Below screenshot
    • Add VAT/Tax line to bank adjustments

      When categorising transactions and matching bank feeds with transactions such as customer payments, we use the "Add Adjustment" to add things like fees/bank fees. It would be useful to choose a VAT/Tax rate here. Whilst there is a bank charges option when adding a payment, this goes into the default bank charges account. We use the adjustments so that we can choose the account and separate our fees. We use different card providers and Worldpay charges VAT so we are stuck. We cannot integrate with
    • New Menu Layout Feedback

      I'd really like to see the banking item back on the top of the menu. I'm sure part of it is just because that's what I'm accustomed to. However, for a bookkeeping program, I think there's a logic to having banking be on top. Not a giant issue, but something
    • How to use Rollup Summary in a Formula Field?

      I created a Rollup Summary (Decimal) field in my module, and it shows values correctly. When I try to reference it in a Formula Field (e.g. ${Deals.Partners_Requested} - ${Deals.Partners_Paid}), I get the error that the field can’t be found. Is it possible
    • Cannot schedule report delivery

      The only 'send option' available when exporting reports is 'immediately' The option to schedule the report is missing.
    • adding attachment in sendmail script where attachment is in a CRM field

      Hi all, I have a custom field of type 'File Upload' in one of my modules in my CRM. I want to include the file in that field as an attachment to an email - which is done from a button on  the 'Results' module. I have created a script and a button to initiate an email from that module. The Deluge scripting window has allowed me to add arguments for all the fields I need to use except for the one file upload type field. My script currently looks like the below (content of the email omitted). As you
    • Signature field is showing black

      Hello, When customer signed the service form, it is showing as below picture Phone model: iPhone 16 Pro We tried delete and install application, but it not solved. This has on phone of a few person. There is any advice to solve this?
    • [Free Webinar] Learning Table Series - AI-Enhanced Insurance Claim Management in Zoho Creator

      Hello Everyone! We’re excited to invite you to another edition of Learning Table Series, where we showcase how Zoho Creator empowers industries with innovative and automated solutions. Struggling with lengthy claim processes, a lack of visibility into
    • How to update changed purchase account of item in invoice

      I have selected the wrong purchase account for various articles and created invoices. I had to adjust the purchase account in the article afterwards, but the old purchase account is still posted in the transaction-journal of the invoice. To adjust the
    • How can I see content of system generated mails from zBooks?

      System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
    • How can I see content of system generated mails from zBooks?

      System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
    • Zoho Suite is very slow

      Since today Zoho is incredibly slow over all applications! What's going on?
    • Not sure how to use credits to my account

      Hi I have a $50 credit to my account. I'm just wondering how I can apply that to either a current invoice or to try a new service. Any advice would be great, thanks. Kind Regards Chris
    • Control who sees Timeline and Interactions in Zoho CRM through Profiles

      The feature has been enabled for all DCs (except US, EU, and IN DCs). We will be rolling it out to the other DCs in the upcoming days. Dear All, In a CRM, not all users would require access to the history of a record. For instance, a Marketing Operations
    • Zoho Desk Integration - Add the option to send the estimate from the Zoho Desk Ticket Integration

      Hi, Currently in the Zoho Desk integration, the user is able to create an estimate from a ticket, once the estimate is created the user can see the estimate under the ticket (see screenshot below), but is not able to send that estimate from Zoho Desk.
    • Zoho Creator to Zoho CRM Images

      Right now, I am trying to setup a Notes form within Zoho Creator. This Notes will note the Note section under Accounts > Selected Account. Right now, I use Zoho Flow to push the notes and it works just fine, with text only. Images do not get sent (there
    • Utilisation de Zoho en conformité avec l’article 286 du Code général des impôts (CGI)

      Cher(e) client(e), Conformément à l’article 286 du Code général des impôts (CGI) impose aux entreprises assujetties à la TVA d’utiliser des systèmes de caisse ou de gestion commerciale certifiés lorsqu’elles enregistrent des ventes à des particuliers.
    • Issue showing too many consultations in my workspace link.

      Hi Team, I’ve set up two Workspaces to track meetings from different sources. So far, this has been working well, and the two Workspaces are differentiated without any issues. However, when I navigate to Consultations and share the link to my personal
    • Zoho CRM Plain Text Template: Line Breaks and Formatting Issue

      Hello, I'm following the instructions to create email templates in Zoho CRM, but I'm having a problem with the plain text version. https://help.zoho.com/portal/en/kb/zoho-sign/integrations/zoho-apps/zoho-crm/articles/zoho-crm-email-templates#Steps_to_create_a_custom_email_template
    • Introducing Profile Summary: Faster Candidate Insights with Zia

      We’re excited to launch Profile Summary, a powerful new feature in Zoho Recruit that transforms how you review candidate profiles. What used to take minutes of resume scanning can now be assessed in seconds—thanks to Zia. A Quick Example Say you’re hiring
    • Zoho MCP has no tools for Creator or 3rd Party Apps?

      I don't see a Zoho MCP community forum so putting this here. Two big problems I see: 1) Although Zoho advertises "over 950 3rd party apps" as available through their MCP, when I go to "Add Tools" there are ZERO 3rd party apps available to choose from.
    • 👋 Welcome to the Zoho MCP Community

      Hello all, glad to have you here! This is your space for everything AI agents, MCP tools, and intelligent business apps. This community is for you — developers, partners, creators, and businesses exploring how agents can transform work. Whether you’re
    • CRM Validation Rules Support Only Single Condition

      Simply put, CRM validation rules support only a single condition for each field on "All Records". You also cannot specify additional validation rules on the same field because it has already been used in an existing validation rule. The ONLY solution
    • Maximum file limit in zoho people LMS

      Dear Team, I am having approximately 4.9 GB of material, including PPTs and videos for uploading in zoho people LMS course. May I know what is the maximum limit limit for the course files Thanking you, With regards, Logeswar V Executive _ Operations
    • Unapproved Leaves are hard to distinguish in Attendance View

      This is a an unapproved leave request It appears in the Attendance view without any visual indicator if its approved or not For a whole day request this might be manageable but for hourly requests it gets very hard to know which are approved, which are
    • Performance Appraisal Probation Period

      Hello All,  Is there any possible way to create an appraisal cycle for new staff members, at the end of probation period? Many thanks!
    • Zoho Creatorの一括操作における処理の同期/非同期について

      現在、Creatorのレポート機能を利用して、複数のレコードに対して一括で処理を実行しようとしていますが、処理の実行順序について確認したいことがあります。 レポート内の複数レコードに一括で処理を実行した際、処理は同期的に行われるのでしょうか?それとも非同期的に行われるのでしょうか? 【同期処理の場合】 レコード①に対する処理が開始され、終了後にレコード②に対する処理が開始され、最後にレコード③に対する処理が実行されるように、処理が順番に行われる場合。 【非同期処理の場合】 レコード①、レコード②、レコード③の処理が一斉に開始され、それぞれ並行して処理が行われ、全処理が終了する場合。
    • Next Page