how to make a downloaded file has file name + file extension in its name?

how to make a downloaded file has file name + file extension in its name?

I want to download the file from 'File Upload' Field in Zoho CRM, after download the file then I will upload it to our own image server to create a download URL link. I wrote the code below.

but the problem is, the file name doesnt have file extension in it. so how to include a file name + file extension in the downloaded file name?

here is the code I use:

  1. // fetch CRM Deal Details
  2. v_Module = "Deals";
  3. v_dealID = DEAL_ID;
  4. v_Endpoint = "https://www.zohoapis.com/crm/v7/" + v_Module + "/" + v_dealID;
  5. r_DealDetails = invokeurl
  6. [
  7. url :v_Endpoint
  8. type :GET
  9. connection:"zoho_crm_connections"
  10. ];
  11. m_DealDetails = ifnull(r_DealDetails.get("data").toMap(),Map());
  12. if(!isNull(m_DealDetails.get("Product_Attachment")))
  13. {
  14. l_Files = List();
  15. for each  m_FileUpload in m_DealDetails.get("Product_Attachment")
  16. {
  17. // get files from Zoho CRM
  18. v_FileDownloadUrl = "https://www.zohoapis.com/crm/v7/files?id=" + m_FileUpload.get("File_Id__s");
  19. v_FileName = m_FileUpload.get("File_Name__s"); // I am trying to get name and extension in here
  20. f_MyFile = invokeurl
  21. [
  22. url :v_FileDownloadUrl
  23. type :GET
  24. connection:"zoho_crm_connections"
  25. ];
  26. f_MyFile.setParamName("file_data");
  27. f_MyFile.setFileName(v_FileName); // set the file name in here but it doesnt work
  28. l_Files.add(f_MyFile);
  29. }
  30. if(!l_Files.isEmpty())
  31. {
  32. first_file = l_Files.get(0);
  33. // send first file only to Blueray Server
  34. bodyMap = Map();
  35. bodyMap.put("file_data",first_file);
  36. fileResponse = invokeurl
  37. [
  38. url :"https://myAPI.com/file/upload"
  39. type :POST
  40. parameters:bodyMap
  41. ];
  42. file_url = fileResponse.get("file_url");
  43. // update the field in deal module
  44. update = {"Product_Attachment_URL":file_url};
  45. zoho.crm.updateRecord("Deals",DEAL_ID,update);
  46. }
  47. }



        • Recent Topics

        • Zoho developer edition does not work for us

          Hi Is anyone else having this problem? I'm signed in with our admin/super user account. When I click on the link on this page: https://www.zoho.com/crm/developer/docs/dev-edition.html I am asked to agree to Terms and Conditions. Clicking Agree to Terms
        • is zoho CRM down today ?

          Is zoho CRM down today ?
        • Export email adresses to email service provider (mailchimp or other)

          Hello, Is there a way to export a list of email adresses from a search in my Zoho Creator forms to an external email service (gmail, yahoo...) and initiate at the same time an email message that I will fill and send myself ? And what about Mailchimp,
        • is it possible to add more than one Whatsapp Phone Number to be integrated to Zoho CRM?

          so I have successfully added one Whatsapp number like this from this User Interface it seems I can't add a new Whatsapp Number. I need to add a new Whatsapp Number so I can control the lead assignment if a chat sent to Whatsapp Phone Number 1 then assign
        • Problem viewing document imported from google drive.

          Hello, When I add a document via my google drive, it is impossible to preview it. I get the error “Files without extensions cannot be previewed. Download to view this file”. Could you please help me? Also, and this is more of a question: is there a way
        • Launch Blueprint or Workflow Automation via Zoho Dataprep Import

          Greetings All, I'm curious - Is it possible to trigger a Blueprint or Workflow via Data Prep import? Thanks in Advance
        • Cross module filtering is now supported in CRM

          Editions: All DCs: All Release plan: This enhancement is being released in phases. It is now available in AU, JP, and CN DCs. Help resource: Advanced filters While the feature is being released in phases, you can also request for Early Access. Early Access
        • Send Supervisor Rule Emails Within Ticket Context in Zoho Desk

          Dear Zoho Desk Team, I hope this message finds you well. Currently, emails sent via Supervisor Rules in Zoho Desk are sent outside of the ticket context. As a result, if a client replies to such emails, their response creates a new ticket instead of appending
        • Posibility to add Emoticons on the Email Subject of Templates

          Hi I´ve tried to add Emoticons on the Subject line of Email templates, the emoticon image does show up before saving the template or if I add the Emoticon while sending an Individual email and placing it manually on the subject line. Emoticons also show
        • Paid Support Plans with Automated Billing

          We (like many others, I'm sure) are designing or have paid support plans. Our design involves a given number of support hours in each plan. Here are my questions: 1) Are there any plans to add time-based plans in the Zoho Desk Support Plans feature? The
        • Bulk Delete Customer Contacts.

          Due to a config issue on my end (my fault), I have ALL contacts from CRM imported as contacts in Books. Some clients have 30+ contacts. Is there a funky way to bulk delete? Each contact has three clicks and a scroll to delete them.
        • Multiple domains for same username and password

          I've come across this situation the vault is currently suggessting the passwords autofill option by the domain. wondering whether is there any option to save one password for multiple domains since the microsoft login has two domains https://login.microsoftonline.com/
        • Option to specify or disable "Idle" times in preferences

          It seems strange to me that my Cliq shows me as "Idle" when I'm using the PC and available just because I haven't interacted with Cliq in a while.  I'm far from "Idle" so we're just treating "Idle" and "Available" to mean the same thing.  I'd like to suggest a setting to change the timeout or even disable the automatic "Idle" mode.
        • Link project tasks to tasks in CRM and/or other modules.

          Hello, I have created and configured a project in Zoho Projects with a set of tasks. I would now like to link these tasks (I imagine according to the ID of each one) to actions in the CRM: meetings, tasks, analytics). The aim is to link project tasks
        • Function #61: Automatically add free item to the invoice based on item quantity

          Hello everyone, and welcome back to another Custom Function Friday! During holiday seasons or special promotions, businesses offer deals like BOGO (Buy One, Get One), Buy 3 Get 1 Free, Buy 2 at 50% off, and much more to attract customers. These promotions
        • Regarding GST Report Issue in Zoho Books

          Hi, Right now, the very important point from my end is this Zoho Books issue. Here, you can see that we have created the invoice with the items of account sales and expenses. The journal is also correct. The profit and Loss statement is also correct.
        • Multiple Salesperson against an invoice

          Hello, Against a particular invoice, we have multiple sales people working. The reason we combine the invoice is becuase we are an exporter and often consolidate cargo for our customer to save them freight costs. How do I capture the contribution of each
        • Projectwise budget ---

          Can we have a Project wise subject in addition to the Monthly, and quarterly ACCOUNT LEVEL budget?
        • Looking back at Zoho Social's 2024: Highlights and memories

          Hey everyone, We hope you had a relaxing and joyous holiday season. Whether you're planning for the new year or still soaking in the magic of the season, we're here to share some exciting highlights from 2024 – a year that was fully packed with updates
        • BIN Locations

          Hi, I’m new to Zoho inventory and unless Im missing something, I cannot find BIN locations anywhere in ‘items’? please tell me it’s there somewhere?!? Thanks
        • Building a Zoho Extension for Webex CC - Handling URL Changes

          Hi everyone, I’m building a Zoho extension for Webex Contact Center (Webex CC) and facing an issue with handling URL changes. In telephony, I’ve set the URL of Webex CC to: https://desktop.wxcc-us1.cisco.com/ When this URL remains the same, everything
        • Remove County field from Customer Address input screen (or allow input to be deleted)

          We are in the USA and have just noticed that there is now a County field in the Customer Address input screen (and maybe other areas of Zoho Books, but this is the one affecting us at the moment). County is not important to our business, and in fact we
        • Bigin API Token Request ("invalid_client")

          Hi people, I tried to connect to the API without success, I've read all of the documentation multiple time and tried just about everything. I tried to do it with Python Request module and with Postman, passing the information through both the URL parameter
        • How to add a Data Updated As Of: dynamically in text?

          I need to add a "Data Updated As Of" in the dashboard to show when was the last date the data was updated. I tried to create a widget but it does not look really good, see below. Is there a way I can do this through the text widget and update it automatically
        • Shared Dashboard / Report Permissions : Read not Write

          hi all, We are missing a huge fonctionnalite in setting up Dashboards (and reports) on corporate level.  Currently, we can not set Read Permissions on share Dashboards (and reports) without giving write access as well When we create a corporate dashboard
        • Trying to catch error with ZOHO.CRM.HTTP.get (Response Code)

          Hello, I'm trying to get response header from ZOHO.CRM.HTTP.get, in order to catch error like 404 or something else but it seems that ZOHO.CRM.HTTP.get() method only returns the body of the response, and I see no way to access the headers returned. Is
        • Profile stitching with Zoho Marketing Automation

          When it comes to marketing, knowing who your audience is and tracking their interactions is vital. That's why Zoho Marketing Automation has taken a significant leap forward with its enhanced profile stitching feature. With this update, you can track your
        • GDPR

          Hi , I'm checking out the HIPPA capabilities and at the moment I can see only three modules that can be selected to enable HIPPA Any idea how I can add additional modules such as customers? TNX David
        • default task list for new project

          Is there any way to have a default task list already created in a project, when the project is created in Zoho Books?
        • Record less quantity than ordered in ZOHO inventory

          Lets say I ordered 100 widgets from a Vendor. I have paid the Vendor month ago and just waiting for the product to ship. I have finally received the products but have only received 80 widgets. I see no way in ZOHO to only receive 80 widgets. ZOHO is forcing
        • Stripe payments via Books invoice link missing email - affects fraud detection

          Hi, All our payments done via Books invoice link have a warning: Integration improvement available This transaction is missing customer email address, which affects fraud detection. Why doesn't Books pass this info to zohosecurepay.eu/books/... for more
        • Power of Automation: Automatically sync custom field data between two tasks.

          Hello Everyone, A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:-
        • 'View Invoice' button hyperlink taking to Google Business Maps listing

          The green "view invoice" button in my invoice emails is sending people to my Google maps business listing rather than the invoice. Both my clients and I are experiencing this as a new issue.
        • Introducing Record Summary: smarter insights at your fingertips

          Hello everyone, Building on the recent launch of Zoho's in-house Zia Large Language Model (Zia LLM)—a major milestone in Zoho CRM’s AI capabilities—we’re excited to introduce the Record Summary feature. This powerful addition makes use of Zia LLM to simplify
        • Migrating Zoho emails to Google Workspace

          Hi Is there a tool to migrate Zoho email to Google workspace?
        • Custom Functions - Calculate Commission - failure after migration from US to EU

          Hello, i would ask for help. My Custom Function - Calculate Commission stopped working and shows a failure. Mismatch of data type expression. Expected List but found String What is the problem? Could anyone help? Here is script: void automation.ObliczProwizje(Int
        • GoCardless Mandate Sync Question

          Hello, When syncing our customer database with GoCardless, some customers aren't working despite both email addresses matching in Zoho Books and GoCardless. Also what do we do about customers where they are associated with multiple accounts as these aren't
        • Create a draft in reply to an email via Emails API

          Hi, I’d like to use the outgoing webhook to automatically create a draft reply to incoming mail. How can I use the Emails API to create a draft reply that is linked to an existing email thread? I couldn’t find the relevant method in the documentation.
        • Weekly Tips: Flags for an organized mailbox

          Wishing you all a Happy New Year 🎉 As we step into 2025, it's time to refocus and set our intentions for the year straight. Whether you're already back at work or just returning from the holidays, you probably have emails that need your immediate attention,
        • Edit line item amount

          It would be sooooo much better to be able to edit the line item amount in all of the modules, if there is any variation in agreed prices it's extremely painful to calculate the rate to match ;-( The rate could be auto calculated on editing this field making life so much easier !
        • Next Page