adding attachment in sendmail script where attachment is in a CRM field

adding attachment in sendmail script where attachment is in a CRM field

Hi all,

I have a custom field of type 'File Upload' in one of my modules in my CRM. I want to include the file in that field as an attachment to an email - which is done from a button on  the 'Results' module.

I have created a script and a button to initiate an email from that module. The Deluge scripting window has allowed me to add arguments for all the fields I need to use except for the one file upload type field. My script currently looks like the below (content of the email omitted). As you see I've tried to add the argument for the field in the system called "Scan PDF" - the rest of the script is executing fine - but the attachment is not appearing, can anyone help ? 

To be clear - the file is sitting  in the field named, in the module within CRM which the function is executing from. I've tried to follow the standard guidance but it seems to not include this case.

ResultIDLong = ResultID.tolong();
ResultDetails = zoho.crm.getRecordById("Results",ResultIDLong);
ScanPDF = ResultDetails.get("Scan PDF");
sendmail
[
      from :zoho.adminuserid
to :Email
bcc :bcc address
reply to :replytoaddress
subject :"Results from your" + Resulttype
message : ....
       Attachments :file:ScanPDF
];
return "Customer Scan Email has been sent";

many thanks
Owen


      • Sticky Posts

      • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

        Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
      • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

        Problem: We use quotes which convert to sales orders but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
      • Custom Function : Automatically send the Quote to the related contact

        Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
      • Function #50: Schedule Calls to records

        Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM
      • Function #37: Create a Purchase Order from a Quote

        Welcome back everyone! Last week, we learnt how to calculate the total number of activities for a lead and further take note of the activity count for particular dates. For instance, from the period of Demo to Negotiation. This week, let's look at a function that lets you create a Purchase Order instantly from a Quote. Business scenario: In any form of business, one of the most important things to do is to document the transactions. Naturally, negotiation, signing an agreement, placing an order,

        • Recent Topics

        • Ticket layout based on field or contact

          Hi! I want to support the following use-case: we are delivering custom IT solutions to different accounts we have, thus our ticket layouts, fields and languages (priority, status field values should be Hungarian) will be different. How should I setup
        • Presenting the brand new Zoho Bookings!

          Hello everyone, Greetings from Zoho Bookings! We're happy to announce a new version of our product with enhanced features to simplify scheduling, coupled with a sleek interface and improved privacy across teams. Here's what you can expect from the latest
        • Restricting Printing

          Hi Is it possible to stop users printing documents?
        • Zoho RPA is now available in your Zoho One bundle!

          Hello All! Of late, it's been quite a stint of new app integrations in Zoho One. This announcement pertains to the addition of another Zoho application, the most sought-after Zoho RPA - Robotic Process Automation, to the bundle. What is Zoho RPA? Zoho
        • Looking for basic script structure course

          Hi, I am not a programmer, but try to learn on my own. I get a lot of good advises in this forum, and thanks, but I tend to ask the same questions since I do not remember comparable answers I already received. Is there a basic course of "scripting structure"
        • Check out in Meetings

          Why there is no check out in Meetings of Zoho CRM, very difficult to track
        • How to let only account-bound products visible to users

          Hello friends, I'm trying to leave only the Products linked to the accounts visible to Zoho Portal users. If the user clicks "All Products," they can open tickets incorrectly for products that do not belong to the account that are registered. Is it possible
        • Canvas Detail View Related List Sorting

          Hello, I am having an issue finding a way to sort a related list within a canvas detail view. I have sorted the related list on the page layout associated with the canvas view, but that does not transfer to the canvas view. What am I missing?
        • Add Lookup Field in Tasks Module

          Hello, I have a need to add a Lookup field in addition to the ones that are already there in the Tasks module. I've seen this thread and so understand that the reason lookup fields may not be part of it is that there are already links to the tables (https://help.zoho.com/portal/en/community/topic/custom-fields-on-task-module).
        • RTL Support on iPad

          hi I have this issue that when I create notes on my android app [in hebrew] all the text is aligned correctly to the right because I’m typing in Hebrew. But then when I open it up on my iPad, everything is suddenly aligned to the left and there is no
        • Sites Speed and Performance Grades

          I noticed that there are no recent inquiries or complaints about load speed or performance issues with Zoho Sites websites. However, I wanted to understand what Zoho has done to ensure that speed remains optimized, images are compressed and lazy loaded,
        • Possible to reorder Pipelines position?

          I have multiple Pipelines and want to reorder their positions, so that in the Deals module record for the Pipeline field, I have them ordered in a certain way. Is there a way to reorder the position of the Pipelines without deleting existing Pipelines
        • Set up multiple IMAP email addresses

          Hi, I just started using CRM and its great, but I just found out I can only add one imap email address for incoming mail in the included salesinbox ...this is ridiculous. All companies have different email such as sales@domain, info@domain , personal@domain
        • Zoho CRM Outlook integration: no option showing up even after installation

          I followed the instructions on this page to install the add-in: https://help.zoho.com/portal/en/kb/crm/integrations/microsoft/ms-outlook-add-in-for-zoho-crm/articles/outlook-add-in-for-zoho-crm#Understanding_the_add-in But I don't see the options in Outlook
        • No sync

          I have amended a note on my PC, startet syncing but on the smart phne sync starts und runs for minutes. The note amendment ist not shown, but when I go to version the new version is shown but not possibility to accepte the new version
        • Validating an order by a superior

          Hi, I have a very specific use case for Backstage. Let me know if this is possible or how I could get around this (or if there are no workaround). One of my client uses Backstage to manage internal (on site) events. Participants from different departments
        • Delete a department or category

          How do I delete a Department?  Also, how do I delete a Category? This is pretty basic stuff here and it's impossible to find.
        • Field Validation and Profile restrictions bypassed using Mass Actions

          We have a Validation Rule that prevents ticket closure if the "Subcategory" field is blank. This has been working fine, but recently we noticed a few tickets per day somehow being closed without a "Subcategory". Upon further investigation we found the
        • Zoho Books - Feature Request - Provide "Show PDF View" toggle on Invoice records

          I have noticed it is possible to activate or deactivate the PDF preview on some records but not all. This would be very helpful on Invoices when a custom template is being used and the PDF preview does not represent the output file. Not available on:
        • Dark mode

          Because the whole world talks about it and iOS also will get this option. Please make a real dark mode happen. It is very cool to switch the navigational color, but the content always stays in light colors.
        • Changing Default PDF Name

          Is it possible to change the default name of a PDF? As of right now, all of my quotes are named 'QT_$QuoteNumber' (i,e: 'QT_19803471298374) - would it be possible to change this to: '$CompanyName - $AccountName - $QuoteNumber' for instance?
        • Automating Sales Order Confirmation & Picklist Generation in Zoho Inventory

          Hi everyone, I’m looking to automate the sales order creation and confirmation process in Zoho Inventory, along with the automatic generation of picklists with bin-level details. Here’s what I need: Sales orders should be automatically created and confirmed
        • Backstage Roadmap to Most Requested Features

          Please provide insight as to ETA for the following: 1. Backstage integration with Zoho Showtime, seems like a no-brainer.       1.a. Why does OnAir look eerily like Showtime integration we must 'pay extra for'? 2. Backstage Integration with Zoho Subscriptions
        • Spotlight series #7: Path animation

          Animating objects on your slide helps make your presentations lively and interesting. Animations add movement to an otherwise static deck, which helps grab your audience's attention. While you can animate your objects' entry and exit, or use animation
        • Assign existing general timelog to a task

          Hello, is there a way to assign a General timesheet log to a task? I.e. I have the following General log: General | Log name | 01:30 I'd like to assign it to a task: Task name | Log name | 01:30 Thank you
        • "Error while processing" when I try to send an e-mail

          Several times today when I have tried to send an e-mail it tells me that there is an "error while processing." What's that about?
        • Zoho Inventory MobileApp compatible with barcode scanners such as Zebra

          Hi, Although the Zoho Inventory App is working with a scanner mode taken directly through the cell phone which I do not consider it as efficient, I would like to know when are you planning an update on the app so it can be compatible with bar code scanners
        • E-Mail auto-complete for deleted contacts

          I am having contacts pop-up in auto-complete when I start to type a letter in the TO address line. These e-mail address have been deleted from my contacts. I also have deleted all e-mails from/to these e-mail address but still there address is showing
        • Zoho Payroll: Product Updates for India - May 2025

          This May, we are glad to unveil new capabilities in Zoho Payroll that simplify your payroll activities. Here's the list: Let Employees Choose Their Tax Deduction Method for One-Time Payments Calculate variable earnings based on percentage of CTC Carry
        • Add picklist in subform lookup

          Hello, I am trying to rewrite a script that works on a from as parent form, to the same form when is is a subform. Here is what I did in the form itself : RefCat = Offre_de_produits.distinct(Categorie_OFFRE); clear Categorie_LIGNE; for each Record in
        • How to validate Rich Text in Zoho Creator! Urgent!

          Hi members, Recently I just started to use Rich Text field. Now I have a requirement where I need to validate to ensure this Rich Text field must contain a value. Meaning must contain something. I use the below script if(input.Rich_Text == null) { alert
        • Public send to group address?

          Am I doing something completely wrong or is it not possible for the public to send to a group email address? For example support@domain.com? I'm able to send from support@domain, but am not receiving emails to that address? Thanks for any help!
        • [Webinar] Zoho Writer for the manufacturing industry

          Creating, sharing, and distributing complex documents are constant challenges in the manufacturing services industry. That's why our next webinar is focused on how to simplify these document workflows. Join us on May 8, 2025, for a Zoho Writer webinar
        • Page HTML to PDF

          Hello everyone, I have a pdf template, but because zoho has limitations in the builder. I made the template in aPages. The question is, how to export the pages as PDF? Thank you very much.
        • What to Add in the Redirect URIs for Zoho Books Integration with Make.com

          I'm currently setting up an integration between Zoho Books and Make to automate my accounting processes. However, I'm stuck on the Authorized Redirect URIs part and could use some help. As part of the OAuth authentication process, I need to configure
        • Allowing workflows to execute as an admin

          Workflows currently seem to execute with the permissions of the logged in user. This is a problem for most of the forms we have where we have hidden fields that perform business logic. If we restrict the permissions of these fields so users can't view
        • This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details

          Hello, Just signed up to ZOHO on a friend's recommendation. Got the TXT part (verified my domain), but whenever I try to add ANY user, I get the error: This user is not allowed to add in Zoho. Please contact support-as@zohocorp.com for further details I have emailed as well and writing here as well because when I searched, I saw many people faced the same issue and instead of email, they got a faster response here. My domain is: raisingreaderspk . com Hope this can be resolved.  Thank you
        • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

          I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
        • Announcing Trident desktop app for Zoho Mail & Zoho Workplace users

          Hello Community, I hope you are doing well and staying safe. As you know, our Mail & workplace teams have been constantly working on adding more value to our offerings to ensure you and your organization continue enjoying your Zoho experience. As part
        • Email policy not working?

          Hi, I created an email policy called "default", under which I created a "default" entry for the access items (the third icon with the key). I've set everything to "ON" (POP, IMAP, ActiveSync, etc.). But then when I create a new user and check it in Mail Admin -> Mail Accounts, it's really under my "default" policy, BUT ActiveSync and IMAP are still disabled by default like they were before. My only goal with creating a custom email policy is to have these enabled automatically because it's annoying
        • Next Page