Navigate between pages

Navigate between pages

 
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,
  1. Need to Navigate to different Pages
  2. Client Script ZDKs related to navigation
         A. navigateTo()
         B. navigation_data
  3. Use Case
  4. Solution
  5. Summary
  6. Related Links


1. Need to Navigate to different Module's Pages in Zoho CRM

Often navigation between Module pages is required for improved user experience and streamlined workflows. Seamless transitions between related modules ensure quick access to relevant data and actions, enhancing productivity. For example, whenever the status of Account is updated to "Deal Creation", you can open the Deal Create Page. 

2. ZDKs to navigate to different pages

A. navigateTo()

Using this ZDK method, you can open any modules' detail/create/clone/edit page in a new tab or in same tab. Here is the syntax.



Click here to know more details.

B. navigation_data

Using The Constant , $Page.navigation_data, you can get the data passed from navigateTo() method.



Click here to know more details.

3. Use Case

Zylker is a manufacturing organisation uses Zoho CRM. The admin wants to automatically open the Deal Create Page whenever the status in the Detail Page of Account is "Deal Creation". Also Deal Create Page should have the "Account Name"  prefilled from the Detail Page of Account record."

4. Solution

If the user updates the status to "Deal Creation" in Accounts module you need get confirmation from the user and  open a new Deal Create Page automatically with Account Name prefilled. 

To accomplish this using Client Script, you need to create two Client Scripts. 

A. Client Script for Accounts Module
B. Client Script for Deals Module

A. Client Script for Accounts Module

Create a Client Script for Detail Page of "Accounts" module with the following details and click "Next". To know more about Creating Client Script, click here.


  • In the Client Script IDE, enter the below script and click Save.
  1. var a_name = ZDK.Page.getField("Account_Name").getValue();
  2. var rec_id = $Page.record_id;
  3. if (value == "Deal Creation")
  4. {
  5.     var resp=ZDK.Client.showConfirmation("Do you want to update the status as Deal Creation?");
  6.     if (resp)
  7.     {
  8.         var rec = $Page.record;
  9.         var rec_id = $Page.record_id;
  10.         rec.status = "Deal Creation";
  11.         var response = ZDK.Apps.CRM.Accounts.updateById(rec, rec_id);
  12.         log(response);
  13.  ZDK.Client.navigateTo('record_create', { module: 'Deals', custom_data: {data: a_name,data_id :$Page.record_id}}, '_blank')
  14.     }
  15. }

  • Whenever the status is updated to "Deal Creation" , you can show a Confirmation box using showConfirmation() asking whether the user wants to update the status as "Deal Creation"
  • Then, update the current record's status using updateById(). You can use the $Page, to get the current record id.
  • Then using  navigateTo() method you can open the Deal Create Page from Account Detail Page.
  • As per the following syntax, you should pass the required parameters, which includes the data needed for the Client Script on Deal Page. In this case the data being passed is the Account Name and Id.
  • Syntax : navigateTo(page, params, data, target)
    • page :  record_create denotes that you want to open Create Page.
    • params :  You need to mention the name of the module for which the Create Page has to be opened. In this case it is "Deals". You can also mention the layout_id and record_id in params. For more details, click here.
    • data : "custom_data" hold the data that you want to pass to the Deals Page.
    • target: You can open the page in same tab or in a different tab using "_self" and "_blank" respectively.
B. Client Script for Deals Module

Now, create another Client Script for "Deals" module with the following details and click "Next".



In the Client Script IDE, add the following script and click "Save"

  1. var a = $Page.navigation_data;
  2. if (a!=null);
  3. {
  4. var field_obj1 = ZDK.Page.getField('Account_Name');
  5. field_obj1.setValue({ "id":a.data_id , "name":a.data });
  6. }

To get the data passed in Account Detail Page, you need to use "$Page.navigation_data". In this script you can use setValue() and mention the id and name of "Account Name". As Account Name is a lookup field, you should mention the Id of the Account along with the Account Name.

Here is how the Client Script Works.


Click here to know more details.

Note:

You can open any external URL using Client Script in a new tab using openURL().



Click here to know more details.

5. Summary :

In this post we have discussed,
  • How to pass data from one page to the other using Client Script.
  • How to perform actions after a record is updated.
  • How to update a record using Client Script without clicking on Save button.
  • How to open external URLs using Client Script.
-------------------------------------------------------------------------------------------------------------------

6. Related Links :


-------------------------------------------------------------------------------------------------------------------

Previous Post: Kaizen #141 - Zoho CRM's API Collection in Postman     |     Kaizen Collection: Home
Join us for our upcoming Zoho CRM Developer Series: Zoho CRM APIs, where you can explore more about Zoho CRM APIs. Register Now!  


    • Recent Topics

    • Same name but different email addresses

      Hello, I'm having a problem with managing the names of users in my organization, one of the examples in the attached screenshot shows that when i changed an email for one of the users the old email stayed but shows the correct name on top of that it also
    • Error opening email

      I just tried Zoho Mail for the first time and finished setting up my account. However, after the setup, incoming emails show an error message in the email body. Could you please help me? Thank you.
    • Setting up DKIM in AWS Route53

      Hi, AWS is not allowing me to enter the large DKIM value, which ZOHO needs me to setup for DKIM: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIr6rqDssUHEehaprZvNqlwBR8kGkQn4+ivpkGWSe+2qxyIBz5OE/AKUgDJLq+IoNYHiLn2hFK+RBbEWIr/5iFdurwclFID7z/QiuKxwIZcmCRq5lFf3xiWIqXwyIRTTr390LMDZdwIgJSISuogtNN/Q5Iv9gkJir/fb3OJxlgEwIDAQAB
    • Can send emails but cannot receive them

      Hello, I'm currently unable to receive emails but can send them. Checked my domain on the settings page as I thought I might have accidentally deleted a TXT file but it's saying it's valid and no option to fetch what TXT fields to do Please let me know
    • Recreating Zoho Account with Existing Domain

      Dear Zoho Support Team, Currently, I own the domain wassclothing.com, but it appears that someone has already registered this domain in Zoho Mail. As a result, I am unable to create a new Zoho Mail account using this domain. Could you please guide me
    • "Unable to scan for viruses.

      : Unable to scan for viruses. I've tried uploading it three times, but I keep getting the same error, which prevents me from sending an invoice. I created the PDF myself and am certain it does not contain any viruses. Are there any workarounds available?
    • Getting an error when trying to connect zoho mail to Make

      Hi, I'm trying to send an email via Make Integration. I configured the Server application and set the connection in Make Scenario. When I hit the save button I get an error from Zoho: Invalid Redirect Uri Redirect URI passed does not match with the one
    • Urgent: Zoho Mail Not Sending or Receiving Emails

      Hi Team, I am experiencing an issue with my Zoho Mail account—it is neither sending nor receiving emails. Please investigate and resolve this as soon as possible. Let me know if you need any further details. Thank you!
    • Zoho ToDo and MS Outlook

      Hi, Is there a way to create a Zoho Todo task from Outlook app or web. eg. Reading email in Outlook and need to create a task to reply on a scheduled date. Regards
    • Payroll Chart of Accounts Config for Dummies

      USA What should my COA look like for one employee, paid via a service (Gusto), no benefits. I pay her wage, associated taxes, and the Gusto monthly fee. I'd like to know the COA account type, any sub accounts, what goes where, any payment splits, etc.
    • Menu Bar

      Hi, Please guide how to change menu bar from vertical to horizontal
    • Create Ticket ignores a list of "secondaryContacts"

      Hi, we're trying to create a ticket, with a contact to be a CC. According to the documentation, it should be a list of IDs in "secondaryContacts". But when the ticket is created, it returns an empty array. Has someone tried it? Thanks for any hint. BTW
    • Zeptomail 136.143.188.150 blocked by SpamCop

      Hi - it looks like this IP is being blocked, resulting in hard bounces unfortunately :( "Reason: uncategorized-bounceMessage: 5.7.1 Service unavailable; Client host [136.143.188.150] blocked using bl.spamcop.net; Blocked - see https://www.spamcop.net/bl.shtml?136.143.188.150
    • Custom TaskList and Tasks creation based on project custom field

      Hello, I'm trying to configure Zoho Project for a specific use. I have created a custom multiselection field in project template and I would like to create one tasklist with multiple tasks in it depending on the multiselection field on each project. For
    • EDIT MAIL DOMAIN

      HOW DO I EDIT MY MAIL DOMAIN
    • On-prem version of Zoho Desk

      Is there an on-prem version of Zoho Desk available for enterprise customers if we have additional aspects of security that aren't covered with current legal and data security terms?
    • Workers unable to submit time logs

      I received a phone call and an email from employees saying that they received the same error code. They cannot submit the hours that they worked. The clerk whose email is problematical is not in the office this week and does not have access to her email.
    • Error 550 - receiving email

      Hi, We've been getting messages from three different customers that our email address was bouncing. Our email address is hello[at]meteoorbooks.com. This was the error message they received: The response from the remote server was: 550 5.0.1 Recipient
    • solicitud cambio de dominio

      buenas tardes por favor me pueden ayudar con un cambio de dominio es que al crear un correo corporativo manual y agregue un dominio inscribí el mío pero le anexe letras de mas y no pude seguir con el proceso y no se como hacer para seguir con la configuración
    • Zoho Desk's ASAP announcement | Time to embrace the enhanced JWT Authentication Mechanism for ASAP | Dec'23

      Hi All, We are eager to introduce the enhanced JWT authentication mechanism for accessing your ASAP add-ons. Effective December 25th, 2023, the ASAP's old JWT authentication mechanism will be deprecated. This means that the option to switch to the new
    • Attach Subform images from Zoho Creator to CRM Module

      Good afternoon eveyone. I am having a difficult time trying to find a way to attach a subform image from a creator app to a CRM module. I have tried so many ways that I don't even know which way was on the right track because none of them worked. If anyone
    • Receipt for Transaction ID2005635324115

      Please share Receipt for Transaction ID2005635324115 towards bashir.salih@wood-man.ae
    • Zoho FSM Extension for Zoho Desk: For Enhanced On-Site Assistance and Unified Customer Support

      We are stoked to present to you Zoho FSM for Zoho Desk, an extension that will help you convert Zoho Desk tickets that require on-site assistance into field service requests in Zoho FSM, ensuring a smooth hand-off from the help desk to field technicians.
    • Not able to send or receive emails

      Hello, I have not been having problems sending and receiving email accounts for about 2 weeks now. I have clean out my folders for storage and it is still not working. Thanks Ward
    • Need Assistance with New Account and DNS Update

      I've created a Zoho Mail account for my Website https://apkqad.com but forgot which Gmail account I used to sign up. Can I setup a new Zoho Mail account and update the DNS records accordingly?
    • Zoho Desk app update - Reply via email option for IM tickets

      Hello, everyone! We're excited to introduce the 'Reply via Email' option for IM tickets, in the latest version of the Zoho Desk Android(v2.7.4) and iOS(2.9.5) app update. You can now respond to IM-based tickets via email within the mobile app. This feature
    • Importing into Multiselect Picklist

      Hi, We just completed a trade show and one of the bits of information we collect is tool style. The application supplied by the show set this up as individual questions. For example, if the customer used Thick Turret and Trumpf style but not Thin Turret,
    • Zoho Meeting Android app update - v2.4.0

      Hello everyone! We are excited to announce that we have brought in support for the following features in the latest version of the Zoho Meeting Android app(v2.4.0): 1. Start Personal Meeting Rooms 2. Revamp of the schedule meeting screen and meeting details
    • Upload and embed a video into an article?

      How can we upload a video and embed it into an article? It is possible for images but this only supports image files. And don't say it has to be uploaded to YouTube, Vimeo or DailyMotion in order to embed it. We're trying to create company documentation
    • Zoho Recruit in 2025

      Hi Zoho team, Is it possible to disclose what is on the roadmap for Recruit in 2025? In comparsion to other ATS options available, Recruit is falling behind. Within the community there are endless request and suggestions from users on feature which would
    • Mass Update Status of Job Openings

      It'd be incredibly useful to be able to mass update the statuses of job openings. I've just been told six jobs are on hold with the same client, so at the moment I need to update all of them individually. Cheers
    • Canvas View in Zoho Recruit

      Is it possible or would it be possible to have the new 'Canvas View' in Zoho Recruit?
    • This mobile number has been marked spam. Please contact support.

      I am having problem of adding my mobile phone number to my account, while enabling the Zoho mail service. I have tried my personal number, working number, and even my parents number and still got the same error "This mobile number has been marked spam.
    • Error when trying to categorize bank transactions

      I am trying to categorize my bank transactions. It was going fine, I categorized 50 or so transaction and suddenly I started getting an error that reads: "Transactions cannot be matched as the account you are trying to match it to, is different.". I select
    • Why there is "Failure" after the "Answer bot" card

      Hi, I'm building a Chat bot for my company. I implement the card "Answer bot" and after this card there is the word "Failure", then if I add another card, this card doesn't work. In this case I add the "End" card. Can you explain how to do to avoid this
    • Kaizen #177: Duplicate Check Preferences API vs. Upsert API

      Hello all!!! Welcome back to another week of Kaizen. Last week, we discussed Optimizing the Use of Record ID Variables in Zoho CRM Queries. This week, we will explore two important APIs for managing duplicate records in Zoho CRM - Duplicate Check Preferences
    • How to block a WhatsApp user for sending spam

      Is there a way to block those whatsapp users that just come to play and annoy our service, they also spam us. We have a waba service with sales iq
    • Sales receipt drop down

      Is the option for Sales receipt only in a paid subscription? If it is which subscription, if it is not how do I get it up on my drop down sales tab.
    • How do you manage sales forecasts by deal when you're a SaaS (subscription) provider?

      Hello, I was wondering how you forecast revenue as a SaaS? Because my LTV moves all the time and I was thinking of updating the amount of each deal in the pipeline according to my LTV stripe, but is it possible?
    • Mass-Delete-Action over API doesn't work because of scope

      Hi all, we're currently trying to mass delete 40000 deals from our CRM, that we have already put into a custom view. I'm not that used to the API, but I managed to authenticate by https://accounts.zoho.com/oauth/v2/token with Postman and going by the
    • Next Page