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








    • 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.
      • Recent Topics

      • Integration with...

        Dear Zoho Commerce team, Please could you consider the integration within Zoho Commerce / Inventory and Qapla'? (https://www.qapla.it/en/) This app is better than Aftership in many ways: - Aftership integration require PRO plan and price start from more
      • Editing the Ticket Properties column

        This is going to sound like a dumb question, but I cannot figure out how to configure/edit the sections (and their fields) in this column: For example, we have a custom "Resolution" field, which parked itself in the "Ticket Information" section of this
      • Image field in custom module

        Hi guy, Is there any hope of adding a custom image field in the custom module? We created a custom module to keep track of assets, and it would be helpful if we could attach an image to the record. Thanks Rudy
      • Repeat Column merge in ZOHO writer columns doesn't allow to set max columns per row

        I'm using ZOHO writer to merge data from a ZOHO CRM subform and I want it to make a table. We're using Insert Table for Column Repeat, because this is what we need. (Name of column (Teamname) and underneath that a list of names of teammembers). It works
      • Generate leads from instagram

        hello i have question. If connect instagram using zoho social, it is possible to get lead from instagram? example if someone send me direct message or comment on my post and then they generate to lead
      • IF Statement in Zoho CRM Formula Field

        Hi, I am attempting to write a formula field that will give me one result if one statement AND another statement are true, then a different value if the first statement AND a different statement are true, else 0. Stated differently: if account = destination
      • Automatically CC an address using Zoho CRM Email Templates

        Hi all - have searched but can't see a definitive answer. We have built multiple email templates in CRM. Every time we send this we want it to CC a particular address (the same address for every email sent) so that it populates the reply back into our
      • Adding Markdown text using Zoho Desk API into the Knowledge Base

        Hi Zoho Community members, We currently maintain the documentation of out company in its website. This documentation is written in markdown text format and we would like to add it in Zoho Knowledge Base. Do you know if there is REST API functionality
      • Create case via email

        Good Afternoon, I have just registered and am taking a look around the system. Is it possible to create a case via email.  I.e. an employee/client/supplier emails a certain address and that auto generates the case which then prompts a member of staff
      • Need a Universal Search Option in Zohobooks

        Hello Zoho, Need a Universal Search Option in Zohobooks to search across all transactions in our books of accounts. Please do the needful Thanks
      • Custom Sorting based on other columns in table

        I need the ability to apply custom sorting to a text-based dimension in the X axis where the sorting is based on another column in the table. For example, I have a chart report where the X axis is a text label. I would like to be able to sort those text
      • Locked Notebook

        Hi, I hadn't used my Notebook in some time and was refamiliarizing myself with it. I clicked a lock icon and now I can't unlock. When I hit the information or unlock icons I'm taken to a page with the notebook icon and a keyboard. When I type, nothing
      • Zoho Books blocks invoicing without VeriFactu even though it is not mandatory until 2027

        I would like to highlight a very serious issue in Zoho Books for Spain. 1. The Spanish government has postponed the mandatory start of VeriFactu to January 1st, 2027. This means that during all of 2026 businesses are NOT required to transmit invoices
      • Unable to produce monthly P&L reports for previous years

        My company just migrated to Books this year. We have 5+ years financial data and need to generate a monthly P&L for 2019 and a monthly P&L YTD for 2020. The latter is easy, but I'm VERY surprised to learn that default reports in Zoho Books cannot create
      • Hide fields only for creation

        Hello, I'd like to hide some fields only during the creation of a contact in Zoho CRM. In fact I have some fields that are automatically calculated thanks to an automation, so when my users create a contact I don't want them to fill those fields. I know
      • Can I hide empty Contact fields from view?

        Some contacts have a lot of empty fields, others are mostly filled. Is there a way I can hide/show empty fields without changing the actual Layout? I would like to de-clutter my view, and also be able to add information later as I am able. I would be willing to learn to code a button, but I am highly confused about it and thus worried it would be beyond me.  I've looked at a lot of the developer documents and I'm not able to make a lot of sense of them.  Thank you in advance to anyone who knows the
      • Issues with Zoho Sheet in Mac

        I have downloaded the Zoho App from App Store but It is failing to Save As, Open & Download Operations. App Store
      • Weekly Sales Summary

        Is it possible to generate a weekly report in Zoho Books to show -$$ amount of estimates generated -# of estimates generated by Salesperson -$$ amount of Sales Orders created -$$ amount of Invoices generated
      • Can I write a check in Zoho Books with no associated bill?

        This currently does not seem possible, and I have a client that desperately needs this function if I am able to convert them with Quickbooks. Thank you in advance for your reply. 
      • OpenAPI Specs are just plain wrong

        The provided yml files for generating the OpenAPI specs are absolutely riddled with errors and inconsistencies. From missing fields on the objects, to just incorrectly named resource objects. I'm having to go through and manually changing the spec to
      • Why Sharing Rules do Not support relative date comparison???

        I am creating a Sharing Rule and simply want to share where "Last Day of Coverage" (Date field) is Greater than TODAY (Starting Tomorrow). However, sharing rules don't have the option to compare a date field to a relative date (like today), only to Static
      • How create a draft via workflow?

        I wish to create a workflow rule for specific emails that creates a draft response - not an automatic email reply, but just a draft with a set response ready to be verified by an agent who can then manually select recipients. Alternatively, the workflow
      • About Meetings (Events module)

        I was working on an automation to cancel appointments in zoho flow , and in our case, we're using the Meetings module (which is called Events in API terms). But while working with it, I'm wondering what information I can display in the image where the
      • Custom Footer – Zoho Writer Document

        Hello everyone, I’m having an issue adding a custom footer in a Zoho Writer document. I would like to insert my company information (including a logo + address) in the footer. The problem is that when I add these elements, the main content of my pages
      • From Zoho CRM to Paper : Design & Print Data Directly using Canvas Print View

        Hello Everyone, We are excited to announce a new addition to your Canvas in Zoho CRM - Print View. Canvas print view helps you transform your custom CRM layouts into print-ready documents, so you can bring your digital data to the physical world with
      • Workflow Down/Bug

        We have a workflow that sends an email to one of our internal departments 10 minutes after a record is created in a custom module. The workflow actually works correctly. However, we have now noticed that on January 8, between 3:55 p.m. and 4:33 p.m.,
      • Report grouping

        I have added a grouping in a report but it is not working how i had expected. I wanted to group a summary on a field named Size but when i add the grouping the report is still showing me each record and making a summary at the bottom of the report. What
      • Social Media Simplified with Zoho Social: Preview your Instagram grid before posting

        For a platform like Instagram that relies on visual appeal, it's important that you plan your image and video content in a way that holds your audience's attention. Planning your grid ahead of time gives you the benefit of understanding how your posts
      • FSM - Timesheet entires for Internal Work

        Hi FSM Team, Several of my clients have asked how they can manage internal timesheets within Zoho FSM. Since their technicians already spend most of their day working in FSM, it would be ideal if they could log all working hours directly in the FSM app.
      • Free Webinar: Zoho Sign for Zoho Projects: Automate tasks and approvals with e-signatures

        Hi there! Handling multiple projects at once? Zoho Projects is your solution for automated and streamlined project management, and with the Zoho Sign extension, you can sign, send, and manage digital paperwork directly from your project workspace. Join
      • VAT rates - exempt and out of scope

        Good Evening, UK based company here. I am a bit confused in respect of setting up VAT rates for exempt goods and services; at present I am simply leaving the VAT rate blank in the transactions in order to prevent any VAT appearing in the VAT return. When
      • Are there settings for hyperlinks?

        Clicking a hyperlinked cell in Sheet creates this little pop-up with the actual hyperlink inside. Is it possible to have a 1-click link where if you click the cell it opens the link directly with no pop-up?
      • How to loop through Multiple Upload and Display Actual File Name

        I have been reading the help on the File Upload Control and reviewed the Deluge help on files and I can not figure out how to loop through the uploaded files and do anything but get the automatically created file names. The code below will run but each
      • abou arattai

        I want to use the Arattai app for business purposes, so please convert my account to a business account.I have my own invoice app, and I want to link it with the Arattai app for direct messaging.
      • 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
      • Configurable Zoho Cliq Notifications for Zoho People Alerts

        Hello Zoho People Product Team, Greetings and hope you are doing well. We would like to request an enhancement to Zoho People notifications, enabling a native delivery via Zoho Cliq with admin-level control, similar to the notification settings available
      • Overlapping Reports in Dashboards

        It's rare, but occasionally it would be a good feature if I were able to overlap reports, either fully or partially in the Dashboards. Also, then having the ability to move objects to the front or rear, or make them transparent/translucent would be good
      • PDF Annotation is here - Mark Up PDFs Your Way!

        Reviewing PDFs just got a whole lot easier. You can now annotate PDFs directly in Zoho Notebook. Highlight important sections, add text, insert images, apply watermarks, and mark up documents in detail without leaving your notes. No app switching. No
      • Looking back at Zoho Calendar in 2025

        Hello Zoho Calendar Community, As we step into a brand-new year, we’d like to take a moment to thank you for being an active and valued part of the Zoho Calendar community. Your trust, feedback, and continued engagement motivate us to keep evolving and
      • Why hybrid project management might be the best fit for you?

        Project management techniques are designed to equip teams with proven methods for easy and efficient project execution. While management teams may have apprehensions about adopting the hybrid method of project management, we’ve compiled the top reasons
      • Next Page