For Zoho Services only:

I'm actually part of something bigger at Ascent Business Solutions recognized as the top Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions offer support for smaller technical fixes and projects for larger developments, such as migrating to a ZohoCRM.  A team rather than a one-man-band is always available to ensure seamless progress and address any concerns. You'll find our competitive support rates with flexible, no-expiration bundles at  For larger projects, check our bespoke pricing structure and receive dedicated support from our hands-on project consultants and developers at

The team I manage specializes in coding API integrations between Zoho and third-party finance/commerce suites such as Xero, Shopify, WooCommerce, and eBay; to name but a few.  Our passion lies in creating innovative solutions where others have fallen short as well as working with new businesses, new sectors, and new ideas.  Our success is measured by the growth and ROI we deliver for clients, such as transforming a garden shed hobby into a 250k monthly turnover operation or generating a +60% return in just three days after launch through online payments and a streamlined e-commerce solution, replacing a paper-based system.

If you're looking for a partner who can help you drive growth and success, we'd love to work with you.  You can reach out to us on 0121 392 8140 (UK) or  You can also visit our website at

Zoho CRM: Client Script Confirmation Box and Popup Mailer

This is an article just repeating a script from the Zoho Kaizen series allowing a confirmation box (something lacking in Zoho Creator - but that every app outside of Zoho has) as well as a popup to email from CRM with a rich-text interface.

The use-case here is non-existent. It's more of a play around to see what can be achieved and how much this can be customized. The task I've set for myself is as follows:
  • Trigger if the contact record has a tickbox called "Extra Confidential" ticked/checked=true
  • Popup a confirmation box to proceed or cancel.
  • Popup the email from CRM mailer with the to email address, bcc, subject and message content already populated.

The example from the Kaizen series uses a record with canvas mode applied; but I wanted to try it without a canvas to see if we can have this functionality using the out-of-the-box ZohoCRM.

Client Script Configuration:
  1. Login to ZohoCRM as a system administrator and go to the Setup page (cog icon in the top right next to the profile image)
  2. Under "Developer Hub" go to "Client Script"
  3. Click on "New Script" button (the blue one - not the "Add Script" grey one)
  4. Give the client script a name, I'm calling mine "Extra Confidential"
  5. Keep Category=Module, set Page=Detail Page (Standard), set Module=Contacts and set the layout if you want.
  6. Under Event Details, set Type=Page Event; Event=onLoad
  7. Click on "Next"
  8. Give it the following code:
    // attempt 
    try {
        // get the ID of this record 
        var v_ThisRecordID = $Page.record_id;
        // get the full name of this contact (not sure why this returns both first and last)
        var v_ContactName = ZDK.Page.getField('Last_Name').getValue();
        // get the email of this contact
        var v_ContactEmail = ZDK.Page.getField('Email').getValue();
        // get the value of the custom boolean/checkbox field "Extra Confidential"
        var b_ContactConfidential = ZDK.Page.getField('Extra_Confidential').getValue();    
        // if this is a sensitive record, ie "Extra Confidential" has been ticked
        if (b_ContactConfidential) {
            // prompt with a confirmation box
            var b_Proceed = ZDK.Client.showConfirmation('Do you want to open the mailer window?', 'Proceed', 'Cancel');
            // if both "Extra Confidential" is ticked and confirmation was Yes/true then proceed
            if (b_Proceed) {
                ZDK.Client.openMailer({ from: '', to: [{ email: v_ContactEmail, label: v_ContactName }], bcc: [{ email: This email address is being protected from spambots. You need JavaScript enabled to view it.', label: 'Copy for myself' }], subject: 'Greetings from the Joel Lipman team!', body: '<span style=\'font-size:12pt;\'>Hi there!<br /><br />I\'m the very model of a modern major general.<br /><br />Bye.<br /><br />the Team.</span>' });
    } catch (e) { 
         // return error (don't display it, just show it in the logs) 
         //ZDK.Client.showMessage("Client Script error"); 
    1.  // attempt 
    2.  try { 
    4.      // get the ID of this record 
    5.      var v_ThisRecordID = $Page.record_id; 
    7.      // get the full name of this contact (not sure why this returns both first and last) 
    8.      var v_ContactName = ZDK.Page.getField('Last_Name').getValue()
    10.      // get the email of this contact 
    11.      var v_ContactEmail = ZDK.Page.getField('Email').getValue()
    13.      // get the value of the custom boolean/checkbox field "Extra Confidential" 
    14.      var b_ContactConfidential = ZDK.Page.getField('Extra_Confidential').getValue()
    16.      // if this is a sensitive record, ie "Extra Confidential" has been ticked 
    17.      if (b_ContactConfidential) { 
    19.          // prompt with a confirmation box 
    20.          var b_Proceed = ZDK.Client.showConfirmation('Do you want to open the mailer window?', 'Proceed', 'Cancel')
    22.          // if both "Extra Confidential" is ticked and confirmation was Yes/true then proceed 
    23.          if (b_Proceed) { 
    24.              ZDK.Client.openMailer({ from: '', to: [{ email: v_ContactEmail, label: v_ContactName }], bcc: [{ email: This email address is being protected from spambots. You need JavaScript enabled to view it.', label: 'Copy for myself' }], subject: 'Greetings from the Joel Lipman team!', body: '<span style=\'font-size:12pt;\'>Hi there!<br /><br />I\'m the very model of a modern major general.<br /><br />Bye.<br /><br />the Team.</span>' })
    25.          } 
    26.      } 
    28.  } catch (e) { 
    30.       // return error (don't display it, just show it in the logs) 
    31.      console.log(e)
    32.       //ZDK.Client.showMessage("Client Script error")
    33.  } 

  1. Zoho CRM: Client Script Confirmation Box and Popup Mailer: Confirmation Popup
  2. Zoho CRM: Client Script Confirmation Box and Popup Mailer: Email Popup


Category: Zoho :: Article: 867

Credit where Credit is Due:

Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman

Related Articles

Joes Revolver Map

Joes Word Cloud


Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Donate to Joel Lipman via PayPal

Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.