Kaizen #129 : Client Script Support for Blueprints

Kaizen #129 : Client Script Support for Blueprints

Hello everyone!

Welcome to another week of Kaizen. Today, let us discuss about how you can use Client Script during a Blueprint transtion to meet your requirements. This Kaizen post will provide solution for the post - Need non-mandatory fields in blueprint pop-up using Client Script.


In this Kaizen post,
  1. What is a Blueprint?
  2. Blueprint event in Client Script
  3. ZDKs and methods available in Client Script related to Blueprint
  4. Use Case - During a blueprint transition, show a pop up with fields that are not mandatory
  5. Solution
  6. Summary
  7. Related Links
  8. Kaizen Collection


1. What is a Blueprint?

Blueprint is an online replica of a business process. For instance, leads generation and follow-up, deals closure and order management. Each of these processes has several stages, and different teams may be responsible to complete each stage. At this point, one needs to take a moment to see if the CRM dictates how these processes should be executed. It captures every detail of your entire offline process within the software. Click here to know more about Blueprint in Zoho CRM.

Moving from one stage of a blueprint to the next stage  is called as Blueprint transition.

2. Blueprint event in Client Script

Whenever you want to meet your custom requirements in Zoho CRM before a Blueprint transition happens, you can use the beforeTransition event type available in Client Script. This event occurs before the transitions occur, as per the process flow designed in the Blueprint. You can add the "return false" statement at the end of the script to prevent the blueprint transition. Click here to know more about the events in Client Script.

3. ZDKs and methods available in Client Script related to Blueprint

Here is the list of ZDKs and methods using which you can code in Client Script.

ZDK.Page.getBlueprintTransitionByID()    -       You can get the blueprint transition by id.

ZDK.Page.getBlueprintTransitions().          -       You can get all the blueprint transitions in page.

getId()                                                            -       You can get the id of transition using Blueprint transition object.

getName()                                                     -        Get the name of transition using Blueprint transition object.

initiate()                                                         -        Initiate the transition using Blueprint transition object.


Click here to view the detailed documentation of ZDKs and methods related to Blueprint in Client Script.

4. Use Case

Zylker is a manufacturing organisation which uses Blueprint to manage the various updates in the status of Leads. Below is the blueprint configuration. For the transition "Gather details", the field  "Alternate Number" will be prompted as mandatory. Without entering this detail, the transition cannot proceed.



This is the existing Blueprint.
Now, the Admin wants to prompt the user to enter a value for the Alternate Number, but it should not be mandatory for the transition "Gather Details".

4. Solution

Currently in Blueprint the fields in the pop-up are mandatory. You can achieve non-mandatory fields in a pop-up using Client Script and update the values to that record. However you should not add the fields in the "During" phase of the "Gather Details" transition in Blueprint, to achieve this non-mandatory pop-up using Client Script. This solution will work for the requirement raised in this post.

For this,  you need to create a Client Script and use the "Before Transition" type of "Blueprint" Event.  



For more details on how to configure a Client Script, click here. Once you give the module and event details, you can see the Client Script IDE's Editor.



The argument "transition" will hold the the details of current Blueprint transition.

In the Client Script IDE, type the below script and click Save.

 if (transition.name == 'Gather details') {
// To show pop up and get the Alternate Number and update the 
//record's Alternate Number 
var var_alt = ZDK.Client.getInput([{ type: 'text', label: Alternate Number}], 'Give these details', 'OK', 'Cancel');

    if (var_alt != null) {

        var lead = ZDK.Apps.CRM.Leads.fetchById($Page.record_id);
        lead.alternate_number = var_phone.toString();
        var response = lead.__update();
    }

    else {

        ZDK.Client.showMessage('Details have been gathered successfully' });

    }

 
   $Client.refresh();// to refresh the page

}

The above script will get executed before every transition happens in the Blueprint. So, in the script, the code is added based on the transition name. As per the requirement, when the transition name is "Gather details" , you can show the pop-up through Client Script's getInput() function. Once you capture this value you can update the alternate number using the CRM API ZDKs. $Page.record_id will return the id of the current Lead record.

Here is how the Client Script works.



You can see that the transition happens even after the "Alternate Number" field is not filled by the user.


Note : 

1.  If you want to prevent a Blueprint Transition you need to add "return false" statement in the Script.      

2.  The blueprint event and the related ZDKs are  available only for Detail(Standard) Page and Detail(Canvas) Page
5. Summary

In this post, we have discussed,
  • About Blueprint events in Client Script.
  • The ZDKs and methods related to Blueprint.
  • How to configure a Client Script to trigger before a Blueprint transition
  • How to open a non - mandatory fields pop up before a blueprint transition
  • How to update current record using Update Records API through Client Script
  • How to refresh a page using Client Script
  • How to prevent a Blueprint Transition
6. Related Links
Kaizen Collection : 


Cheers!
Maadhari M









      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • Kaizen #222 - Client Script Support for Notes Related List

            Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
          • Kaizen #217 - Actions APIs : Tasks

            Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
          • Kaizen #216 - Actions APIs : Email Notifications

            Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
          • Kaizen #152 - Client Script Support for the new Canvas Record Forms

            Hello everyone! Have you ever wanted to trigger actions on click of a canvas button, icon, or text mandatory forms in Create/Edit and Clone Pages? Have you ever wanted to control how elements behave on the new Canvas Record Forms? This can be achieved
          • Kaizen #142: How to Navigate to Another Page in Zoho CRM using Client Script

            Hello everyone! Welcome back to another exciting Kaizen post. In this post, let us see how you can you navigate to different Pages using Client Script. In this Kaizen post, Need to Navigate to different Pages Client Script ZDKs related to navigation A.

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ



                                ご検討中の方

                                  • Recent Topics

                                  • How to install Widget in inventory module

                                    Hi, I am trying to install a app into Sales Order Module related list, however there is no button allow me to do that. May I ask how to install widget to inventory module related list?
                                  • Deluge date time issue

                                    The deluge function info zoho.currentdate.toString("MMM/YYYY") returns Dec 2026 instead of 2025
                                  • Sending automated messages that appear in the ticket's conversation thread

                                    Good morning, esteemed Zoho Desk community, warm greetings Today I am here to raise the following problem, seeking a solution that I can implement: I need to implement an automation that allows me to send reminder messages to customers when I am waiting
                                  • Power up your Kiosk Studio with Real-Time Data Capture, Client Scripts & More!

                                    Hello Everyone, We’re thrilled to announce a powerful set of enhancements to Kiosk Studio in Zoho CRM. These new updates give you more flexibility, faster record handling, and real-time data capture, making your Kiosk flows smarter and more efficient
                                  • Set connection link name from variable in invokeurl

                                    Hi, guys. How to set in parameter "connection" a variable, instead of a string. connectionLinkName = manager.get('connectionLinkName').toString(); response = invokeurl [ url :"https://www.googleapis.com/calendar/v3/freeBusy" type :POST parameters:requestParams.toString()
                                  • sync views to sheet

                                    Im looking to sync my views aka reports in analytics to zoho sheets, when data is updated in analytics it also should be updated in sheets, till now zoho sheets only offer raw data connection and it is not enough as these reports are difficult to re-do
                                  • How to update the Status in a custom module?

                                    Hi, I have a custom module "cm_payment_registry" in Billing, I am trying to change the status which is "Draft" with: array = {"custom_status":"Approved"}; zoho.billing.update("cm_payment_registry",organization.get("organization_id"), XXXXXXXXXXXXXX, array,"connectionname");
                                  • is it possible to add more than one Whatsapp Phone Number to be integrated to Zoho CRM?

                                    so I have successfully added one Whatsapp number like this from this User Interface it seems I can't add a new Whatsapp Number. I need to add a new Whatsapp Number so I can control the lead assignment if a chat sent to Whatsapp Phone Number 1 then assign
                                  • Replace Zoho Invoice with QuickBooks

                                    We are implementing Zoho FSM for a cleaning business in the US with 50+ field workers. This business has been using Quickbooks for accounting for decades and will not migrate to Zoho Books. A major issue in the integration is the US sales tax calculation.
                                  • Reply and react to comments

                                    Hi everyone! We're excited to bring to you a couple of new features that'll make your sprint process simpler. A cloud application brings with it an array of social media features that can be efficiently used in your organizational setup. As an agile scrum
                                  • Possible to connect Zoho CRM's Sandbox with Zoho Creator's Sandbox?

                                    We are making some big changes on our CRM so we are testing it out in CRM's Sandbox. We also have a Zoho Creator app that we need to test. Is it possible to connect Zoho CRM's Sandbox to Zoho Creator's Sandbox so that I can perform those tests?
                                  • Send Supervisor Rule Emails Within Ticket Context in Zoho Desk

                                    Dear Zoho Desk Team, I hope this message finds you well. Currently, emails sent via Supervisor Rules in Zoho Desk are sent outside of the ticket context. As a result, if a client replies to such emails, their response creates a new ticket instead of appending
                                  • 2025 Highlights: A Year of Steady Progress and Significant Developments

                                    As we come to the end of 2025, let's take a moment to reflect on the significant progress and developments we've made to improve your travel and expense management. In the Spotlight Introducing Online Booking (US edition only - Early access) Enable online
                                  • Hide/Show Subform Fields On User Input

                                    Hello, Are there any future updates in Hide/Show Subform Fields "On User Input"?
                                  • Zoho Sheet for Desktop

                                    Does Zoho plans to develop a Desktop version of Sheet that installs on the computer like was done with Writer?
                                  • Unable to remove the “Automatically Assigned” territory from existing records

                                    Hello Zoho Community Team, We are currently using Territory Management in Zoho CRM and have encountered an issue with automatically assigned territories on Account records. Once any account is created the territory is assigned automatically, the Automatically
                                  • Reminders for Article Approval

                                    Is there a way to send reminders for approvers to review articles and approve/deny them? I'm not seeing that option anywhere.
                                  • ¿Cómo puedo configurar las contraseñas creadas bajo una directiva para que nunca caduquen y no aparezcan como caducadas en los informes?

                                    ¿Cómo puedo configurar las contraseñas creadas bajo una directiva para que nunca caduquen y no aparezcan como caducadas en los informes? La razón por la cual contraseña estas no deben caducar es porque su actualización depende de mi cliente y no de mí.
                                  • Function #42: Show the actual rate of items on invoices

                                    Hello everyone, and welcome back to our series! In Zoho Books, you have the ability to create Price Lists, wherein you can mark up and mark down the item rates by a specific percentage or set custom rates. Generally, when you apply a price list to an
                                  • Ability to Set Text Direction for Individual Cells in Zoho Sheet

                                    Dear Zoho Sheet Team, We hope you are doing well. We would like to request an enhancement in Zoho Sheet that allows users to set the text direction (right-to-left or left-to-right) for individual cells, similar to what is available in Google Sheets. Use
                                  • Emails sent through Bigin are not posting in IMAP Sent folder

                                    I have set up my email to work from within Bigin using IMAP.  I am using IMAP so I can sync my email across multiple devices - phone / laptop / desktop / iPad / etc.  I want all my emails to populate my email client (outlook & iphone email) whether or
                                  • New in CRM: Dynamic filters for lookup fields

                                    Last modified on Oct 28, 2024: This feature was initially available only through Early Access upon request. It is now available to all users across all data centers, except for the IN DC. Users in the IN DC can temporarily request access using this form
                                  • Move record from one custom module to another custom module

                                    Is it possible to create a button or custom field that will transfer a record from one custom module to another? I already have the 'Leads' module used for the Sr. Sales department, once the deal is closed they convert it to the 'Accounts' module. I would like to create a 'Convert' button for a custom module ('Locations') for the department that finds locations for each account. Once the location is secured, I want to move the record to another custom module called 'Secured Locations'. It's basically
                                  • Warehouse fast processing

                                    Hey guys, would anyone be interested in something like the attached image ? If there's any interest I'd be willing to develop it further for others to use, it's much faster than using Zohos native solutions, it can part pack, pack in full, part ship,
                                  • Data Processing Basis

                                    Hi, Is there a way to automate the data processing for a candidate every time an application arrives from job boards, without requiring manual intervention? That is, to automatically acquire consent for data processing. I've seen a workflow that allows
                                  • Can't change form's original name in URL

                                    Hi all, I have been duplicating + editing forms for jobs regarding the same department to maintain formatting + styling. The issue I've not run into is because I've duplicated it from an existing form, the URL doesn't seem to want to update with the new
                                  • Start/Stop Timmer in Chrome Extension

                                    The chrome extension is great and allows you to do allot however one of the most common things employees working on projects need to do is track their time. Having an easy start/stop timer to track time would be great.
                                  • Turning the page for Zoho SalesIQ: 2025 to 2026

                                    As we wrap up 2025, we would like to take a moment to reflect on what we set out to achieve this year, what we’ve delivered, and where we’re headed next. What we focused on in 2025 This year was all about strengthening the core of engagement and AI, making
                                  • Invalid collection string

                                    I haven't changed anything in one of my functions. I'm trying to run it manually and suddenly "Invalid collection string" appears. My code has 6 lines and the error says that the error is on 7th line. Why? What does this error mean? Nothing has been changed
                                  • Zoho Directory 2025: New Features | Security Enhancements | Enriched UI

                                    Hello everyone, Greetings from the Zoho Directory team! 2025 has been a highly successful year for Zoho Directory. We are delighted to introduce a fresh set of features, an enriched UI, and major product enhancements. These updates aim to deliver a smoother
                                  • Bulk Schedule for Posting TikTok

                                    Hallo, We have a client whose business is a social media agency specifically TikTok. Currently they are handling 30 TikTok accounts from. I think zoho Social can handle it with Agency License + with Add on 10 Brands. Their concern is related to posting
                                  • Convert Lead Automation Trigger

                                    Currently, there is only a convert lead action available in workflow rules and blueprints. Also, there is a Convert Lead button available but it doesn't trigger any automations. Once the lead is converted to a Contact/Account the dataset that can be fetched
                                  • zoho people 5 report

                                    How do I customize my report in Zoho People Report? I understand that I can get the results of multi-table queries through SQL join statements, but I don't know the relationship between each table. I tried to create a report using Attendance User Report
                                  • Leave Report Emailed Weekly

                                    I am wondering if someone knows how to have a report generated either weekly or monthly or both for department heads and ownership of upcoming employee leave. For instance, it would be nice to get an emailed report on Friday for the upcoming week of who
                                  • Ability to Edit YouTube Video Title, Description & Thumbnail After Publishing

                                    Hi Zoho Social Team, How are you? We would like to request an enhancement to Zoho Social that enables users to edit YouTube video details after the video has already been published. Your team confirmed that while Zoho Social currently allows editing the
                                  • Zoho Flow Decision Continuing Despite Not Meeting Conditions

                                    I have a picklist field called Lead Status in the leads module, with the following lead Statuses: New Lead Attempted Contact - 1 Attempted Contact - 2 Attempted Contact - 3 Attempted Contact - 4 Attempted Contact - 5 Attempted Contact - 6 Attempted Contact
                                  • Add RTL and Hebrew Support for Candidate Portal (and Other Zoho Recruit Portals)

                                    Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to set the Candidate Portal to be Right-to-Left (RTL) and in Hebrew, similar to the existing functionality for the Career Site. Currently, when we set the Career Site
                                  • Zoho Books Sandbox environment

                                    Hello. Is there a free sandbox environment for the developers using Zoho Books API? I am working on the Zoho Books add-on and currently not ready to buy a premium service - maybe later when my add-on will start to bring money. Right now I just need a
                                  • Tip #55- Accessibility Controls in Zoho Assist: Exploring Vision Settings- 'Insider Insights'

                                    As we approach the end of the year, it’s a good moment to reflect on how we can make our tools more inclusive and easier to use for everyone. Remote support often involves long hours in front of screens, varied lighting conditions, and users with different
                                  • Zoho Recruit Slow and Freezing on all screens

                                    We have had an issue with Zoho Recruit for weeks being extremely slow and at times freezing.  We have 100 mega internet, and I went into each computer and updated the virtual memory so there is more available.  Also restarted all computers daily.  Still having the issues.  Almost unable to work.
                                  • Next Page