Dynamically Show or Hide Sections on Specific Pages in Zoho CRM

Dynamically Show or Hide Sections on Specific Pages in Zoho CRM

Requirement Overview

Zoho CRM user wants to Hide certain layout sections only on specific pages — like CreateEditClone, or Detail Pages— to simplify the UI and improve the user experience.

Use-case

-> A User has a Finance Related Business(i.e. A Bank or Insurance Company). Company deal with Customer personal information, financial transactions, bank account details, confidential tax information, etc. and these information are stored in each Sections.
-> Usually, user will only fill Customer's information while creating a record and other information will be filled with further follow-ups. Hence, other unwanted sections(i.e. financial transactions, bank account detail, etc.) needs to be hidden in Create Page alone.

Current Challenges to achieve this directly

As of now, we do not have a permission-based controls to Show/Hide sections in Specific Pages. While the Layout Rules feature can be used to hide sections, it applies globally across all pages, which makes it unsuitable for this particular requirement.

Permissions & Availability

Info
-> Users with the Modules Customization permission can add field into module layout & manage Layout rule.
-> Users with the Developer Permission can configure & setup Client Script.
-> Users with the Manage Sandbox permission can manage the sandbox.

Solution - Step-by-Step Implementation Guide

-> To fulfill this requirement and enhance the user interface, we will utilize multiple built-in features in Zoho CRM—such as Layout Rules, Client Scripts, and Workflow Rules—to hide specific sections on designated pages.

Hide Sections in CREATE/EDIT/CLONE Page

To hide sections in Create/Edit/Clone page, we will have to use below technical components.

Info
Technical Components
  1. Layout Rule
  2. Client Script
  3. Workflow Rule (for Detail view page to show section)

STEP1 - Checkbox field in layout to control section visibility

Add a Checkbox field(named - Show Section) in required module layout(i.e. Lead, Contact, etc.).



Info
If you do not want your users to see the custom field, then you can mark it as hidden(i.e. Don't Show) for all profiles in Field Edit Properties.

STEP2 - Create a Layout Rule

Navigate to Setup (⚙️) in Zoho CRM >> Customization >> Kiosk studio >> Create Kiosk.

Create a Layout Rule for the required module to show/hide section based on above added checkbox field.



STEP3 - Create a Client Script 

Navigate to Setup (⚙️) in Zoho CRM >> Developer Hub >> Client Script >> New Script.
Add script for "Create Page --> select required Module & Layout -> Event Type as Page Event -> Event as onLoad"

Using Client Script, we will set the added Checkbox field as "Read Only" and update field as "Not Selected" on Load of Create Page. So that, it would hide the section in Create Page alone.



SAMPLE CLIENT SCRIPT

  1. // //Getting Field 
  2. var hideShowVar = ZDK.Page.getField('Show_Section');
  3. console.log("hideeee", hideShowVar);

  4. // //Updating checkbox field as Selected
  5. hideShowVar.setValue(false);

  6. // //Making field as Read Only by default
  7. hideShowVar.setReadOnly(true);

Now, when user saves a record(from Create Page), it would redirect to Detail Page where section should be visible. To control this, we will use Workflow Rule additionally to update the Checkbox field as "Not Selected", so that it would show the section in Detail Page.

STEP4 - Create a Workflow Rule

Navigate to Setup (⚙️) in Zoho CRM >> Automation >> Workflow.
Add a workflow for required module and set "Trigger as Created/Editor with Repeat enabled -> No Condition -> Action as Field update".




Info
Workflow Rule required only when you want to show/hide sections specifically on Create/Edit/Clone pages alone.

Overall Configuration Demo - Screencast



Overall Working Demo - Screencast


Hide Sections in Detail Page - Standard View

To hide sections in Detail page, we will have to use below technical components.

STEP1 - Add two checkbox fields in layout to control section visibility & Reload


-> Add a Checkbox field(named - Show Section) in required module layout(i.e. Lead, Contact, etc.).

-> Add an other Checkbox field(named - ForDetailPage - stop automatic reload) in same layout to control automatic refresh of Detail page.



Info
If you do not want your users to see the custom field, then you can mark it as hidden(i.e. Don't Show) for all profiles in Field Edit Properties.

STEP2 - Create a Layout Rule


Navigate to Setup (⚙️) in Zoho CRM >> Customization >> Kiosk studio >> Create Kiosk.
Create a Layout Rule for the required module to show/hide section based on above added checkbox field.



STEP3 - Create a Client Script 


Navigate to Setup (⚙️) in Zoho CRM >> Developer Hub >> Client Script >> New Script.
Add script for "Detail Page --> select required Module & Layout -> Event Type as Page Event -> Event as onLoad"

Using Client Script, we will set the added Checkbox field(Show Section) as "Read Only" and update field as "Not Selected" on Load of Detail Page. So that, it would hide the section in Create Page alone.

Notes
Note : Currently, any updates made to the Detail Page through Client Script do not reflect immediately; the user must reload the page to see the changes applied to the record.

Due to above limitation, we will automatically refresh the record Detail page using same Client Script so that whenever user opens a record Detail Page, script would update the record and make an automatic reload. However, we will have to stop reload after once. Hence, we are using an other Checkbox field to stop reload.




For Example:
Whenever a user opens a record, Client Script would trigger and update both Checkbox fields as below. Based on Checkbox2 value(if not selected), we will reload page. By this way, we will control reload of page only at once.

Checkbox1 : Show Section ---> as "Not Selected"
Checkbox2 : ForDetailPage - stop automatic reload ---> as "Selected"

SAMPLE CLIENT SCRIPT:

  1. // Fetching current record
  2. var recDetail = ZDK.Apps.CRM.Testss.fetchById($Page.record_id);
  3. // console.log(recDetail);

  4. recDetail.Show_Section = false;
  5. recDetail.ForDetailPage_stop_automatic_reload = true;
  6. var recUpdate = recDetail.__update();
  7. console.log("recUpdate",recUpdate);

  8. var stopField = ZDK.Page.getField('ForDetailPage_stop_automatic_reload');

  9. // //Making field as Read Only by default
  10. stopField.setReadOnly(true);

  11. var stopFieldVal = stopField.getValue();
  12. console.log(stopFieldVal);
  13. console.log("field value");

  14. if (stopFieldVal == false) {

  15.     //to refresh the Detail Page automatically after update for one time.
  16.     console.log("entered");
  17.     ZDK.Client.navigateTo('record_detail', { module: 'testss', record_id: $Page.record_id }); 
  18. }

Working Demo for Detail Page - Screencast



Alert
To ensure a smooth implementation, we recommend configuring and testing the setup in the sandbox environment before deploying it to production.
Idea
Above Use-Case would also help in such scenario where Business want to show specific section based on User's Profile. Using Client Script, you could fetch logged in user details using $Crm.user method ( Help_Reference ) and then perform above actions to hide section.

Roadmap

We do have plans to support Show/Hide Sections using Client Script directly in future, enabling users to dynamically control section visibility on required pages based on business requirements.



If you need any further clarifications, please don’t hesitate to contact partner-support@zohocorp.com.

NotesAdditionally, we kindly ask all Europe and UK Partners to reach out to partner-support@eu.zohocorp.com.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              WCAG

                                      Create. Review. Publish.

                                      Write, edit, collaborate on, and publish documents to different content management platforms.

                                      Get Started Now







                                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                            Manage your brands on social media


                                                              • Desk Community Learning Series


                                                              • Digest


                                                              • Functions


                                                              • Meetups


                                                              • Kbase


                                                              • Resources


                                                              • Glossary


                                                              • Desk Marketplace


                                                              • MVP Corner


                                                              • Word of the Day


                                                              • Ask the Experts


                                                                Zoho Sheet Resources

                                                                 

                                                                    Zoho Forms Resources


                                                                      Secure your business
                                                                      communication with Zoho Mail


                                                                      Mail on the move with
                                                                      Zoho Mail mobile application

                                                                        Stay on top of your schedule
                                                                        at all times


                                                                        Carry your calendar with you
                                                                        Anytime, anywhere




                                                                              Zoho Sign Resources

                                                                                Sign, Paperless!

                                                                                Sign and send business documents on the go!

                                                                                Get Started Now




                                                                                        Zoho TeamInbox Resources





                                                                                                  Zoho DataPrep Demo

                                                                                                  Get a personalized demo or POC

                                                                                                  REGISTER NOW


                                                                                                    Design. Discuss. Deliver.

                                                                                                    Create visually engaging stories with Zoho Show.

                                                                                                    Get Started Now








                                                                                                                          Wherever you are is as good as
                                                                                                                          your workplace

                                                                                                                            Resources

                                                                                                                            Videos

                                                                                                                            Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                            eBooks

                                                                                                                            Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                            Webinars

                                                                                                                            Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                            CRM Tips

                                                                                                                            Make the most of Zoho CRM with these useful tips.



                                                                                                                              Zoho Show Resources