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

    • Migrate emails from a shared mail box to a private mail box

      How is possible migrate a shared mail box if the migration tool require a password, and the shared mail dosent have ?
    • Support poor service

      I just wanted Zoho support to give me some more concrete answers. I’m facing SMTP error issues, and they told me that the South American IP was experiencing problems, but they didn’t provide an estimate for when it would be resolved. Now my company is
    • Zoho say my domain seems to be already associated with another account

      I created a zoho account for try my domain mail configuration. When I want to add my domain in this page https://mailadmin.zoho.com/hosting?plan=free then this shows an error that is "This domain is already associated with this account a*****n@f*****."
    • Incorrect Device Time

      Hi On my windows laptop I can't sign into Zoho mail due to "incorrect device time". I'm in Toronto, Canada. How can this be resolved?
    • Get user images by API

      Hi For our internal management software, I want to retrieve user photos via REST API: curl --location --request GET 'https://profile.zoho.com/file?fs=thumb&ID=<zoid>' \ --header 'Authorization: Zoho-oauthtoken <token>' The token has `profile.userphoto.ALL`,
    • Depois de 1 ano não consigo receber e-mail

      Consigo enviar e-mails mas não estou recebendo nenhum e-mail isso aconteceu pontualmente após eu completar 1 ano de uso. Me ajudem por favor
    • Submitted form URL

      I am using the feature "Include a link to allow respondents to edit their responses" for the first time. This URL is included in the email sent to the user after they press Submit. If a form is Saved, there is a section called Partially Saved Entries
    • Function for Emails tranfer from Lead to Deal

      Hi Due to the fact that my Deals conversion needs to be done in 2 ways - depending on the fact if those records already exists or not - resources in fields are different. I am making function control conversation for Leads but I have problem with transferring
    • Create a new immigration service- Similar to immigration law software

      It will be good if you can build a new service. Data will be pulled from the employee form. Then automatically users should be able to complete immigration forms like I 129, ETA 9089, ETA 9035 E, G- 28, W4, I 9 PDF forms and then be able to send for signature with Zoho sign. Immigration Softwares like docketwise can be used for ideas. The advantage with this it sits within Zoho people and employees don't have to feed data in another system
    • Accessibility in Zoho CRM: Not just a feature—a way to empower

      For instructions on setting up these controls, please check this help document: Configuring accessibility controls. Hello everyone, Today (December 3, 2024), on the International Day of Persons with Disabilities, we begin our journey towards a CRM that
    • Zoho Meeting very bad video quality

      Hello, I need 1080p HD on my Zoho Meeting as explained here: Low Resolution/Quality Video (zoho.com) Currently, video quality is lagging with 400mb internet which is not acceptable for my business. My 1080p 60FPS webcam performs well on platforms like
    • Contacts with Deals not appearing.

      What: I simply want to see all of the contacts that are tied to an open deal Problem: In Contacts Module > When filtering on Contacts with an open deal, Zoho only shows some Contacts instead of all. Details: More specifically, I should have ~200 contacts
    • Auto-sync field of lookup value

      This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
    • CRM limit reached: only 2 subforms can be created

      we recently stumbled upon a limit of 2 subforms per module. while we found a workaround on this occasion, only 2 subforms can be quite limiting in an enterprise setting. @Ishwarya SG I've read about imminent increase of other components (e.
    • Version of Cliq included with Zoho One and Limitations

      I'm confused by the information presented in the application detail page of Zoho One. I'm a solopreneur with a single-seat Zoho One Enterprise license and I need to communicate externally .. extensively. The plan details page suggests channels are limited to 100 members. Whereas the pricing plan comparison page on the Cliq marketing site says 2500 for enterprise level.  If it's 100... that's going to kill my use case as it is my understanding that external customers can only be communicated with
    • Resubmit for Approval for Zoho Books Module in CRM

      The integration between CRM and Books is great, but it is incomplete in many areas. One of them is if an estimate/invoice/sales order is rejected, the users in CRM cannot resubmit it for approval. Let's face it, sales people will mostly be in CRM and
    • Upload edited meeting recording for attendees to download

      Hi Would it be possible to let meeting organisers upload an edited version of the meeting recording? Usage case: most of us probably start a meeting 15 minutes before the official start time. It would be nice to trim that dead time off the recording.
    • Why does the embed feature within the article editor seem to be not functional?

      I would like to embed media into an article, but that feature seems to be non-functioning. Am I doing something wrong? to clarify, I do not want to create an article by embedding. I want to embed media into an article I have created in a manual.
    • Get all fields using COQL

      Hi Is it possible to get all the fields of a record using COQL?. Something similar to select * from Accounts in SQL.
    • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

      Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
    • Inquiry Regarding Image Display Issue in Campaign Duplication

      We are currently using Zoho Campaigns for email distribution to our clients. I would like to inquire about an issue we encountered. When duplicating a previously created and sent campaign from the "All Campaigns" section, the images used in the header
    • Can it change the language ?

      Hello ! The question is in the title ;) 
    • Notes and Notebook integration

      Maybe I missed it, but is there a way to synch notes in the desktop with the notes in the Notebook app? I've been combing through the help topics and other forum entries and not finding anything. When I downloaded the android app I assumed there was integration with the desktop notes. Is that not the case? thanks.
    • Tags on notes aren't syncing correctly on Android

      I've created notes on the desktop version that have several tags assigned, but on both my Android devices those notes only have ONE of those tags instead of all of them, despite the actual content of the note being correctly synced, and I'm also starting
    • Text formatting does not work (Notebook Mac)

      The text formatting does not work at all. It seems, that the program loses the selection and therefore hitting bold, italic, etc. does not do anything.
    • For Each Loop only returns 1st result of List, not the whole list?

      I have a custom function that collects event data from Google calendar using invokeURL. I want to create meetings in CRM from this URL response. The invokeURL response contains over 100 records and works perfectly (code line 2). Then I'm using a For Each
    • Zoho Sheet-Pulling in Data

      I have a module where we track POs, Bills etc (its easier for us this way). In this PO Module, we have a task related to a Job/Deal and various fields for costs. A Supplier on a Job might have several POs in this module for the job. I want to generate
    • Subform Data in v2 REST API

      What is the mechanism for adding subform data in the Creator v2 REST APIs?  There is nothing documented in the Data APIs documentation (https://www.zoho.com/creator/help/api/v2/).   I was able to determine how to GET the subform data by adding it to the
    • How do I delete a test email address to which I am supposed to send a test email?

      How do I delete an email address added to a test email recipient that is no longer needed due to resignation or other reasons?
    • What is Attendee Status 0 and 1?

      Hi there, I recently stumbled upon the API to get the attendee list and in the return value, there is a parameter called "status", and 0 supposed to mean not_attending, and 1 means attending. I cannot find this representation anywhere in the attendee
    • Kaizen #121 : 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
    • Batch Number on Packing Slip

      When we send orders to our warehouse, we want to tell them the batch number to pull from the shelf.  It seems we should be able to pick the batch when assembling the package. In the current Inventory, we have to create an invoice, pick batches for the invoice.  This is too late.   As a workaround, we are sending the invoice to the warehouse (via a template that removes most of the price information).  This is cumbersome and causes our warehouse to see the total invoice price (which can't be removed
    • Editing a bundle

      How can I edit a bundle?
    • Saving URL for Submitted Forms

      The unique URL for submitted forms should be saved automatically within 'System Fields'. (without sending a duplicate email to myself, there is no other way to retrieve the unique URL for a submitted form if the user wishes to update) Additionally, it
    • Implement Meeting Polls in Zoho Bookings

      Dear Zoho Bookings Support Team, We'd like to propose a feature enhancement related to appointment scheduling within Zoho Bookings. Current Functionality: Zoho Bookings excels at streamlining individual appointment scheduling. Users can set availability
    • Response from a customer via web channel

      Is it possible to ensure that a customer using the web channel can respond to an agent's question without creating a new thread but instead linking their response to the existing thread?
    • Venezuelan Bolivares missing from available currencies

      My mother is ill and lives in Venezuela. I do her finances and insurance expences related to medical billing. Most receipts are in Venezuelan Bolivares. However I cannot find this currency. I am migrating from Expensify which conveniently has Bolivares
    • Flow with CRM

      Hello, I have a simple flow that uses a web hook to enter data into a Sales Order. I have the web hook sending Flow data which has a PO field. If the PO has a special character like - or / or \ the task fails. How can I get the flow to be okay with the
    • Using WhatsApp with your existing number

      Hi. We want to use the WhatsApp functionality in Zoho Desk. We already have a WhatsApp business account. Is it possible to use your existing number instead of creating a new number?
    • Customize Section

      I know it has to be in the themes somewere but where is it that you can change the divider color of a section?
    • Next Page