Customize List views using Client Script

Customize List views using Client Script

Hello everyone! 

Welcome back to another interesting Kaizen post. In this post, we can discuss how to customize List Views using Client Script. This post will answer the questions Ability to remove public views by the super admin in the Zoho CRM and Is it possible to restrict ZCRM user to see only custom views created by administrator?



In this post,
  1. What is a List View?
  2. Use Case - To hide all public views except one
  3. Solution using Client Script
  4. Other ZDKs available to customize List Views
  5. Summary
  6. Related Links



1. What is a List View?

      A List View is grouping of records based on a defined set of criteria. List Views are beneficial for displaying customer specific data according to your business requirements. For example, you may be interested in following-up on the leads created during the last week or reviewing overdue tasks. The best way to handle these scenarios is to filter the records using the list views. Click here for more details on List Views.There are two types of List Views in Zoho CRM -
  • Standard List Views : You can modify the standard views and sort the order of the columns in the list. 
  • Custom List Views : You can create, modify, and delete custom views, and you can also sort the order of the columns in the list.
Often, there are business requirements where you need to customize these views, like hiding a view from certain users or masking a particular column in the view. Let us see how to control the list views visible to a user, using Client Script.

2. Use Case - To hide all public views except one

      Zylker is a manufacturing company that uses Zoho CRM. A Salesman creates records in the custom module named "Orders".The name of the profile assigned to a Salesman is "Sales".  The Admin does not want the "Sales" profile users to view the standard public views except the "My Orders" public view.

3. Solution using Client Script 

      Admin should remove the visibility to all public views for the profile "Sales" and permit only the "My Orders" view. Here are the list of steps to be followed.
  • Create a Client Script for List Page (Standard) of Orders module and specify the event as onCustomViewLoad.  To know more about how to create a Client Script, click here.





    log(ZDK.Page.getComponent("list-custom-view").getOptions());


  •  Then,  getOptions() will return the options in the component of List Page. Here the component is 'list-custom-view'.
  • Now with  the copied id of "My Orders" view , use  "getComponent.setOptions()" and add the only option on list-custom-view as "My Orders" view, if the profile is "Sales".

var user = ZDK.Apps.CRM.Users.fetchById($Crm.user.id);
if (user.profile.name != 'Sales') {
    ZDK.Page.getComponent("list-custom-view").setOptions([{ id: "5575270000000876021" }]);
}
  • Save the Script.

  • You can now see that only "My Orders" view is visible for the "Sales" profile, and all other public views are hidden.

  • For other profiles like Manager and Admin, all public views will be visible as shown below.

We are working on the other components in the List Page, and will let you know once they are live.

4. Other ZDKs available to customize List Views

Client Script enables you  to customize List Views using the following list of ZDKs and Client Script functions.
  • freezeColumns(option) - You can freeze list view and disable modifying columns.
  • maskField(field_name, (length,character,reverse)) - You can mask fields in the List View
  • sortByField(field_name, option) - You can sort field in the List View
  • getRecords() - You can get Records in the List View
  • selectRecords(criteria) - You can select Records in the List view by criteria
  • selectRecordsByID(ids) - You can select Records in the List view by record ID
  • clearSelection() - You can clear selected Records in the List view
  • style(style_config, criteria) - You can style Records in the List View. Click here to view the related Kaizen post.
  • setValue(value) - You can set the component value in the Page
  • getValue() - You can Get the component value in the Page
  • setVisibility(value) - You can set visibility of the component in the Page
5. Summary:

In this post, we have discussed,
  • About standard and custom List Views.
  • How to control the visibility of List Views using Client Script.
  • How to fetch the list of views available for a module using Client Script.
  • How to set your desired views for users using Client Script.
  • ZDK methods available in Client Script to customize List views

6. Related Links

Notes
Kaizen Collection : 
Click here to view our Kaizen Collection. 
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.


Cheers!





        • Recent Topics

        • Shared Snippets Everyone

          Hi, Now that the Shared Snippets have been released and I think will be the most used feature implemented in 2023 :) Creating and Using Snippets in Ticket Responses - Online Help | Zoho Desk Maintain consistency in ticket responses with shared snippets
        • Introducing parent-child ticketing in Zoho Desk [Early access]

          Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
        • How to suppress display of "USD" of currency field?

        • New permissions for accessing emails sent via Zoho CRM

          Last modified on Nov 4, 2024: Permissions for accessing emails sent via Zoho CRM have now been extended to the IN DC. With this rollout, the feature is now available to all users across all DCs. Resources: Data sharing for emails, Configuring email compose
        • When is Zoho Vault getting fuzzy search?

          Seeing posts on here dating back as far as 3 years complaining about Vaults search functionality. It’s terrible. Please include fuzzy search, and sorting of results according to “most applicable”; not just alphabetically.
        • Automation#22 Track Ticket Duration at Specific Status

          Hello Everyone! Welcome back to the Community Learning Series! Today, we explore how Zylker Techfix, a gadget servicing firm, boosted productivity by tracking the time spent at a particular ticket status in Zoho Desk. Zylker Techfix customized Zoho Desk’s
        • Self-Support Portal invites

          I'm a one man operation and I'm using the free version of the Zoho Desk for now, but I am in need of help. When I do test tickets, I get a reply from the system inviting me to join the Self Service portal. I don't plan on using that, so I wonder if there
        • Lookup field in User module cannot look up to custom modules!

          Hi there, Expense has been great so far but it's sad to see that a simple thing such as allowing a lookup to custom modules from the Users module is not yet implemented. Hope to see this in the next release. Do you have any plan for that?
        • Tip #10: Automatically add tags to Zoho CRM records using form responses

          You may be using tags to filter records, create reports based on specific tags, or let your sales team to know which clients to give priority to. Don't skip tagging for the crm records added via forms. The tags can be set to be automatically captured during the form submission. How it works When you set up a configuration to push form entries into CRM, you can add a tag to them automatically. The tag value can vary based on the respondent's input (captured using form fields), or you can include a
        • Understanding response time

          We have the following set up for our SLA. When a contact first writes in, the response due and resolution due dates are set. When one of our agents responses, the response due goes away. When a ticket gets a response from the contact, it appears to reset
        • Publish multiple languages at once in Knowledge Base

          Does anyone know if it is possible to publish multiple translated articles at the same time? My knowledge base has about 35 languages, and while I have them set up to automatically translate, I still have to go in and select each language and manually
        • Canvas and Related lists

          Hi, As much as I like canvas, when adding in a asection with related lists,it doesnt mimic the same functionality as the standard view within the CRM e.g left hand panel will show the module and total number of records. Is there a way of indicating this
        • Email address ZOHO suggestions in replying - how to delete unwanted suggestions?

          Hi, I have some "unwanted" email addresses suggestions by ZOHO, and made some mistakes by replying for some tickets already. How can I clear this in ZOHO directly, I deleted all web browser history and cookies . Did not help :/ Below example, where one
        • Copy Widget to another Dashboard

          I can see the option to clone a widget to the same dashboard but is it possible to copy it to another dashboard?
        • Subform edits don't appear in parent record timeline?

          Is it possible to have subform edits (like add row/delete row) appear in the Timeline for parent records? A user can edit a record, only edit the subform, and it doesn't appear in the timeline. Is there a workaround or way that we can show when a user
        • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

          Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
        • Zoho Learn vs. Trainer Central

          Hi, I'm currently using Zoho One with a WordPress-based website and WooCommerce to manage my online courses. I would like to know what is the difference between Zoho Learn and Trainer Central and if it's possible for these two platforms to replace WP
        • How to Display a Logo Image on a Public Form?

          I would like to display a logo image in the header of a form. To achieve this, I added an Add Notes field to the form. The code below works perfectly for Zoho users accessing the form. However, when the form is made public, the image does not load properly:
        • Clear String field based on the value of other field

          Hello everyone, We would like to be able to clear a string field (delete whatever has been written and make it empty) when another field (picklist) is changed to a specific value. While I can empty other types of fields, I noticed that I can't do this
        • Creating a Zoho Online Meeting in a Blueprint

          We are looking for an easy solution to schedule online meetings in a blueprint and ran into the same problem discussed in this topic: https://help.zoho.com/portal/en/community/topic/custom-function-to-set-meeting-to-online-meeting (After connecting Zoho
        • Enabling 'From Number' and 'To Number' fields in the Calls module

          Hello everyone, We've added "To Number" and "From Number" fields in the Calls module as part of our latest update to provide users with the option to enable or disable them through the Calls Preferences tab. When enabled, these fields will be displayed
        • Exciting Update: Multi WhatsApp Business Account (WABA) Support Now Available in SalesIQ!

          We’re pleased to share an important update that will enhance the way you manage your WhatsApp Business accounts (WABAs) within SalesIQ. With the launch of Multi WABA support, you can now connect and manage multiple brands more effectively, each under
        • Route Optimizer

          Does Zoho Inventory offer route optimization for our in-house deliveries? It will save us time to manually route our daily orders. Thank you
        • Can documents attached to different ZohoForms automatically go to different OneDrive folders?

          Hi there, I set a workflow to track and store applications coming in from our website. I created two different Zoho forms, one for unsolicited applications, one for applications to job postings. After any of the forms has been filled in, a new record
        • Kaizen #126 - Circuits in Zoho CRM - Part 1

          Hello everyone! Welcome back to another week of Kaizen! Today, we will discuss an exciting topic—Circuits in Zoho CRM. For starters, we will discuss what Circuits are, how beneficial they are for businesses, different views of a Circuit, and the different
        • Mail is no longer populating CRM contacts

          Hi! For the last few days, my mail hasn't been populating my CRM contacts. Even people I email multiple times per day. In fact, it keeps trying to send mail to myself. Notice, I started typing Amy and only got as far as, "Am" and it suggested myself.
        • Custom field doesn't fill when converting sales order to invoice

          Hi, When I convert a Sales Order to an Invoice one of the custom fields on a product line names "Subsidie" does not seem to fill in automatically. I manually have to select the product again by clicking on the product name in the order line en re-select
        • TeamInbox down?

          Hi everyone, we are getting message "Sorry, this action cannot be performed due to an internal error. Please try again later. We are on the Canadian data centers. Can someone please confirm if the service is down? Thank you! F
        • Increase subscription prices for existing subscriptions

          Hi, Does anyone know how we could achieve the ability to increase the subscription fee for our existing customers based on a % increase. We are not yet using Zoho Billing (Subscriptions) and I'm not sure if it is a good fit for us. But we would need to
        • Purchase Requisition in Zoho Books

          I want to understand if Zoho Books is having the following workflow: PR ( Purchase Requisition ) >> PO ( Purchase order) >>  GRN/SRN ( Goods/Services receipt note) >> Bill
        • Stop adding Default ID column to xls exports

          When anything is exported to xls, Zoho adds a column with an ID.  WE DO NOT WANT THIS COLUMN.  We use an automated report to a team.  We have our own tracking number.  1. This makes the report messy, it just pushes OUR data off to the right.  2. We have
        • Confirmation prompt before a custom button action is triggered

          Have you ever created a custom button and just hoped that you/your users are prompted first to confirm the action? Well, Zoho knows this concept. For example, in blueprint, whenever we want to advance to the next state by clicking the transition, it is
        • Marketer's Space: Streamline marketing and sales by integrating ZMA's Planner with Zoho CRM

          In a competitive market, clear goal-setting and seamless campaign execution are crucial for marketing and sales alignment. When integrated with Zoho CRM, Zoho Marketing Automation's Planner enables marketers to create, manage, and measure campaigns effectively
        • Custom emails for Portals not working

          I changed the standard templates to custom email templates for all three options, but the invitation is still sending the original email layouts. Anyone know why this would be happening? I changed them 2 days ago.
        • Switching scheduled webinars from Live to On-demand

          Now that On-Demand webinars has been added as an option for webinar presenting, is there a way I can edit already scheduled webinars from Live to on-Demand? These scheduled webinars already have people registered. Thanks
        • Zoho CRM v2.1 deprecation or sunset plans ?

          Hi Team Wanted to know if there is any plan to deprecate v2.1 CRM apis https://www.zoho.com/crm/developer/docs/api/v2.1/ and if yes by when
        • Forex Bank Refund Entry

          Hello, please advise how to enter refunds from our bank forex department. The refund was because we were on preferential rates but at the time of USD purchase were not given the preferential rate, therefore the bank calculated the excess that we paid
        • Auto-Populating Custom Field

          This is to request a feature enhancement for our invoicing system. We're currently creating invoices with a single item per invoice and have a custom field called "Related Vehicle." We would like the "Related Vehicle" field to be automatically populated
        • How can i Customize Delivery Note?

          I need to customize delivery note like change the tittle for language purposes and also include only the balance due
        • Delivery note template

          We have some reasonable templates for sales docs but the delivery note one is very limited. It would be nice if we could have the same options as the sales form templates or even create our own by cloning an existing sales template, modifying (ie: removing
        • Next Page