Unable to retrieve Contact_Name field contents using Web API in javascript function

Unable to retrieve Contact_Name field contents using Web API in javascript function

Hello,

I've added a field in the Purchase Order form to select and associate a Sales Order (Orden_de_venta, lookup field). I've also created a client script to complete some fields from the Sales Order (and the Quote), when the user specifies the related SO (field onChange).

In this script there are two fields, one of then is been loaded and the other not, the difference is one is a single line field (envio_direccion) and the other one is a lookup to Contacs (envio_contacto).
I also need to retrieve the Contact_Name from the Sales Order to a third field (so_contacto).

I'll appreciate some link/guidance on where can I find documentation (like this one below), I've never did much javascript before and I'm new to Zoho so I'm struggling a little. 


Thanks in advance!



var ov = ZDK.Page.getField("Orden_de_venta");

if (ov) {
    var orden = ov.getValue();
    if (orden && orden.id) {
        var ovId = orden.id;

        var orden = ZDK.Apps.CRM.Sales_Orders.fetchById(ovId);
        var regpresupuesto = ZDK.Apps.CRM.Quotes.fetchById(orden.Quote_Name_Lookup_Id);
       
        if (regpresupuesto && regpresupuesto.id) {

            var direnvio = ZDK.Page.getField("envio_direccion");
            direnvio.setValue(regpresupuesto.Direcci_n_de_env_o);  // this is working

            var contactoenvio = ZDK.Page.getField("envio_contacto");
            contactoenvio.setValue(regpresupuesto.Contact_Name);      //this is NOT working

var contactoOV = ZDK.Page.getField("so_contacto");
            contactoOV.setValue(orden. ??? ); // I also need the contact_name from the SO

        } else {
            limpiaCampospresupuesto();
        }
    }
    else {
        limpiaCampospresupuesto();
    }
}
else {
        limpiaCampospresupuesto();
}

function limpiaCampospresupuesto() {
    var direnvio = ZDK.Page.getField("envio_direccion");
    direnvio.setValue(null);
    var contactoenvio = ZDK.Page.getField("envio_contacto");
    contactoenvio.setValue(null);
}



      • Sticky Posts

      • Kaizen #222 - Client Script Support for Notes Related List

        Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
      • Kaizen #217 - Actions APIs : Tasks

        Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
      • Kaizen #216 - Actions APIs : Email Notifications

        Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
      • Kaizen #152 - Client Script Support for the new Canvas Record Forms

        Hello everyone! Have you ever wanted to trigger actions on click of a canvas button, icon, or text mandatory forms in Create/Edit and Clone Pages? Have you ever wanted to control how elements behave on the new Canvas Record Forms? This can be achieved
      • Kaizen #142: How to Navigate to Another Page in Zoho CRM using Client Script

        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, Need to Navigate to different Pages Client Script ZDKs related to navigation A.

        • Recent Topics

        • Projects custom colors replaced by default orange

          Since yesterday, projects uploaded to Zoho, to which I had assigned a custom color, have lost the customization and reverted to the default color (orange). Has anyone else had the same problem? If so, how did you resolve it?
        • Interview booked through Invite but no Notifications

          We have a workflow that was developed through a developer/partner that was tested and worked. Today, we pushed a candidate through the process and invited them to an in-office interview. They were sent the booking link (as usual and as tested before successfully)
        • WebDAV support

          I need WebDAV support so that I can upload/download (and modify) documents from my local file system. Is anything planned in his direction?
        • Automatiser la gestion des SLA dans Zoho Desk avec Zoho Contracts

          Les équipes du service client s’efforcent d’assurer un support rapide, régulier et fiable pour garantir la satisfaction de chaque client. Les accords de niveau de service (SLA) permettent de clarifier les engagements en définissant les termes et conditions
        • iOS App doesn't refresh for Document Creation

          Hello Zoho team, I have created a workflow to be used on a mobile iOS device which starts in Zoho Creater and ends with a murge and store function that then opens the newly created document within the Zoho Writer app. This process is working great however
        • Uploading a signed template from Sign to Creator

          Good day, Please help me on how to load a signed document back into Creator after the process has been completed in Sign. Below is the code that I am trying, pdfFile = response.toFile("SignedDocument_4901354000000372029.pdf"); info pdfFile; // Attach
        • Zoho DataPrep and File Pattern configuration

          I'm using Zoho data prep to ingest data from One Drive into Zoho Analytics... The pipeline is super simple but I can't any way to get all the files that I need. Basically I need to bring all the files with a certain pattern and for that I'm using a regex
        • Assistance needed: Activation of a domain

          Hello Zoho Support, I purchased the .com domain "primesolva.com" via Zoho 6 days ago. The domain is still pending, and I cannot access the DNS panel to add the TXT verification for domain ownership. Please confirm the registration status and help me activate
        • Operation not permitted

          I am trying to add an email address to the list of user but I am getting error Operation not permitted
        • Request to Permanently Delete Email User (info@mehbobgulf.com ) from Old Organization

          Please permanently delete the user email info@mehbobgulf.com It is still associated with my old Zoho organization. I cannot delete it because it shows ‘You cannot delete email. Zoho host’. I need to use this email in a new Zoho account.”
        • Client host [89.36.170.5] blocked using Spamhaus

          Hello please make make actions for delist ..... "Client host [89.36.170.5] blocked using Spamhaus"
        • Suggestion: Option to Re-run a migration

          As I'm going through a migration process, I like the IMAP migration tool, but it would be better if there were an option to re-run the same migration as configured. There's not even an option to copy/edit one that's already there. Just run if it hasn't
        • Issue with "Add Your Mobile Number"

          Hello, I am trying to sign up for email service for a domain name, and I cannot finish the authentication. When I enter my mobile number, I receive the message "We’re unable to send OTP to this mobile number. Please contact support-as@zohocorp.com". I
        • zoho mail non vérifié

          Bonjour, Il y'a un jour que j'ai acheté un domaine et toute les tentatives pour l'associé a mon compte shopify son vaine. j'ai essayé TXT sans suite après, j'ai essayer avec CNAME sans suite. j'aurais besoin de votre assistance pour associé mon mail.
        • Unable to send message;Reason:553 Relaying disallowed. Invalid Domain

          i have facing the issue "Unable to send message;Reason:553 Relaying disallowed. Invalid Domain" if i verify domain evertthing i did but still face the same error.
        • ZohoMail is so close to being Perfect BUT

          Why don’t you have HILIGHTING???!! I've been trying to find a substitute for Edison Mail but I want & need hilighting (preferably in more than just yellow)! Is this even on your To Do list? I’m so disappointed. 🙄
        • Override Auto Number field?

          We are preparing to migrate from Salesforce. In Salesforce, we auto-generate a unique number on our Opportunities (Potentials). If the Opportunity results in a contract, we use that unique number as the Contract number. There are some situations where
        • Using a third party service provider want to move directly with Zoho

          Hi good day I’m currently using Zoho but I’m using a third party service provider I want to move directly with you guys I’m using Zoho email and invoices and my domain please let me know if it’s possible to move away from the third party provider my email
        • Request for Assistance Regarding Email Sending Issue (554 5.1.8 - Email Outgoing Blocked)

          Dear Zoho Support Team, I hope this message finds you well. I am writing to request assistance with an issue we are currently facing regarding our Zoho Mail account. Our email account, admin@tuyensinhcanuoc.com, is encountering the following error when
        • Zoho Mail API returns empty inbox (0 messages) but webmail shows 37 unread emails

          Hello, I'm experiencing a discrepancy between Zoho Webmail and the Mail API (EU region). **Setup:** - Account: EU datacenter (mail.zoho.eu) - API: Self Client OAuth2 via api-console.zoho.eu - Scopes: ZohoMail.messages.READ, ZohoMail.messages.UPDATE, ZohoMail.folders.READ,
        • Zoho Mail not working

          Zoho Mail not working
        • ShipStation and Zoho Inventory

          Hello, I am looking to sync zoho inventory with shipstation ZOHO INVENTORY           SHIP STATION Sales Order  ==>  create ORDERS INVOICE  <==    Shipments What exactly does BETA mean on the Shipstation connector?  This is required for me to sign-on in the next month. Thanks in advance for your efforts
        • Are there settings for hyperlinks?

          Clicking a hyperlinked cell in Sheet creates this little pop-up with the actual hyperlink inside. Is it possible to have a 1-click link where if you click the cell it opens the link directly with no pop-up?
        • 550 5.4.6 Unusual sending activity detected. Please try after sometime

          Hi, I am receiving this error message when trying to send my emails. The only reason I can think why this is happening is my previous two emails were bounced back to me due to a non working mailbox error. I have followed the online links for unblocking but it says there are no blocks on my account. How and when can I get my email working again to send emails? Thanks,
        • How do I remove a data source from Zoho Analytics?

          I am unable to find a delte option on a datasource that i put in the system as an error. On teh web it refers to a setup icon but I do not see that on my interface?
        • E

          We are trying to add our Zoho Form embed in our Elementor Page Builder. After adding Zoho Forms widget in elementor page builder it’s displaying in backend page builder but it’s giving 403 error while trying to save, as it’s not reflecting in front end.
        • Kaizen #225 - Making Query-based Custom Related Lists Actionable with Lookups and Links

          Hello everyone! Welcome back to another post in the Kaizen series! This week, we will discuss an exciting enhancement in Queries in Zoho CRM. In Kaizen #190, we discussed how Queries bridge gaps where native related lists fall short and power custom related
        • Ability to Edit YouTube Video Title, Description & Thumbnail After Publishing

          Hi Zoho Social Team, How are you? We would like to request an enhancement to Zoho Social that enables users to edit YouTube video details after the video has already been published. Your team confirmed that while Zoho Social currently allows editing the
        • Formatting Problem | Export to Zoho Sheet View

          When I export data to Zoho Sheet View, ID columns are automatically formatted as scientific notation. Reformatting them to text changes the actual ID values. For example, 6557000335603071 becomes 6557000335603070. I have attached screenshots showing this
        • Add Attachment Support to Zoho Flow Mailhook / Email Trigger Module

          Dear Zoho Support Team, We hope you are well. We would like to kindly request a feature enhancement for the Mailhook module in Zoho Flow. Currently, the email trigger in Zoho Flow provides access to the message body, subject, from address, and to address,
        • Connecting Zoho Inventory to ShipStation

          we are looking for someone to help connect via API shipStation with Zoho inventory. Any ideas? Thanks. Uri
        • Clone / Export Popup Design Across PageSense Projects

          Hello Zoho PageSense Team, We hope you’re doing well. We would like to request an enhancement that allows popup designs to be reused across different PageSense projects. Problem Statement: Currently, Zoho PageSense allows popups to be duplicated only
        • custom module import.

          Is there a way to import data into a custom module? Thanks Rudy
        • HEIC File Type Viewer

          Hi, It would be nice to be able to click on the images in the All Entries/Reports Tables which are HEIC the same as JPG, PNG, etc. so they open in a viewer from Zoho or the Attachment Service, today HEIC requires you to download each image and open it
        • Building Toppings #4 - Setting up and using connections in Bigin toppings

          When building a topping to extend Bigin's functionality and connect it with third-party applications, creating and handling connections is an important step. Connections provide a secure way for your topping to authenticate and communicate with other
        • Free Webinar: Zoho Sign for Zoho Projects: Automate tasks and approvals with e-signatures

          Hi there! Handling multiple projects at once? Zoho Projects is your solution for automated and streamlined project management, and with the Zoho Sign extension, you can sign, send, and manage digital paperwork directly from your project workspace. Join
        • Need code format to specify default values

          Can someone please direct me to the code syntax or the proper translation per the instructions circled below. These instructions don't seem correct.
        • AI Interview Insights: Turn Recorded Interviews into Quick Transcripts & Summaries

          Evaluating interviews shouldn’t require replaying long recordings or taking manual notes. With AI Interview Insights, you can now review complete transcripts and AI-generated summaries of your One-way (Recorded) interviews right inside Zoho Recruit. This
        • Facing email delivery issues? Verify your domain's DNS records

          Have you ever wondered why your legitimate emails are landing in the recipient’s spam folder? Or been surprised to see emails sent from your registered domain getting rejected by recipient email servers? Why does this happen? In most cases, this happens
        • Order of Departments in Help Desk

          In the end user portal, , the departments are sorted by the date of creation of the department (or perhaps their id). Is there a way to choose the display order of the departments or at least to be able to sort them alphabetically?
        • Next Page