Auto-Generate & Update Asset Serial Numbers using a custom function (Assets Module)

Auto-Generate & Update Asset Serial Numbers using a custom function (Assets Module)

Hello Team,

I’ve been working on a script to automate one of our processes in Zoho FSM, and the core functionality has been successfully implemented. However, I’m encountering an issue related to serial number allocation, which is not working as expected.

Below is a detailed explanation of how the script functions, along with an example of the issue I’m facing.

Script Functionality

The script handles two scenarios based on the asset type:

  1. If the Asset Type is "Product":

    • It updates the Asset Name field (API Name: Name) and the Description field (API Name: Description).

    • The format used for the asset name is: SKU (from Services and Parts module (API Name: SKU)) + Serial Number (API Name: GIAI) + Product Name (from Services and Parts module (API Name: Name)).

    • The description field is updated with the name (API Name: Name) from the Assets and Parts module.

  2. If the Asset Type is "ProCare Contract":

    • It performs the same field updates as mentioned above.

    • However, in this case, the serial number is generated automatically for the specific asset type through the workflow.

    • The functionality is working, but the serial number allocation is incorrect. This is the main issue I'm facing.

Issue – Incorrect Serial Number Allocation

Although the logic is mostly working, the serial numbers are not being assigned in a sequential or consistent manner.

Expected Behavior:

For example:

  • Asset A → Created Time: 2025-04-20 19:39 → Serial Number: 0001

  • Asset B → Created Time: 2025-04-20 19:40 → Serial Number: 0002

  • Asset C → Created Time: 2025-04-20 19:41 → Serial Number: 0003

Actual Behavior Observed:

  • Asset A → Created Time: 2025-04-20 19:39 → Serial Number: 0003

  • Asset B → Created Time: 2025-04-20 19:40 → Serial Number: 0002

  • Asset C → Created Time: 2025-04-20 19:41 → Serial Number: 0001

As you can see, the serial numbers are not aligning with the asset creation timestamps.

I’ve attached the script I developed for reference. I would greatly appreciate it if someone could help me resolve this issue.

For your reference, I’m currently using the Zoho FSM Professional subscription.

Thank you!



        • Recent Topics

        • Change work hours per day for employees

          Hello, Is there a way to modify the work hours per day for employees in Zoho projects? This would be helpful for resource allocation to more accurately see when an employee who works 35 hours a week vs 40 hours has a full schedule. Thanks.
        • PROBLEMA AL CONECTAR EL DOMINIO

          hola buenas tardes hoy estoy tratando de crear mi registro y no me deja conectar el dominio  me dice que el dominio ya está vinculado a una cuenta y la verdad no tiene conectado el dominio a ninguna cuenta  tengo acceso al hosting y cpanel que se compro pero al revisar los dns estan apuntando al mismo hosting del panel  del proveedor del domini ... como hago para poder crear la cuenta con ese dominio, incluso cree un registro pero no  me deja vincularlo el dominio es integrasoft.co agradezco me ayuden  
        • Delay in delivery of emails

          I'm experiencing random delays for emails sent from Zoho account. Headers show that the message reached mx.zohomail.com almost instantly, followed by a delay of anywhere from 3-15 minutes (and counting). Please confirm whether this is a system-wide
        • Zoho Mail not working. Constant OTP

          Firstly, my emails have been playing up for over a year. They are struggling to send and I have to press Send a few time to make them going. They mostly hover with a loading note saying Sending. I emailed Zoho and they got it working, but now it is doing
        • Zoho Mail Storage Usage Discrepancy – Incorrect Storage Reporting

          Dear Zoho Support Team and Community, I previously raised a concern about inaccurate storage usage reporting in Zoho Mail but did not receive a clear or satisfactory response. To investigate further, I meticulously calculated the storage used by all folders
        • What Is ZOHO-Workplace? Why was I charged?

          Hi, Today my PayPal account was charged $12.72 for ZOHO-Workplace. The transaction ID is 15S32484H3826544W. What is this charge for? It is the first time I am seeing it.
        • Building a custom site

          do we have an option in Zoho to build custom sites like adding custom functionalities? want to make a site like https://trackscourier.com/jnt-tracking-ph/. Is it doable? Please assist.
        • Missing Payload Details

          Hi All, Does anyone know how to fix missing webhook payload data in the next step of the flow? Payload comes into the webhook -- All details here When i go to use the webhook data in the next step -- the majority of the payload data is missing
        • Numeric options in Decision

          Zoho really needs to add options for numeric comparisons in the Decision action. These are the ones that should be implemented: Greater than Less than Greater than or equal to Less than or equal to Equal to (although this is actually handled already)
        • Supercharge your VoC analyses with data from anywhere: Modules are now sources for VoC

          Dear customers, We hope you're well! Your customers talk about your brand, praise your service, criticize your offerings, or promote your business—literally from anywhere on the internet—and it has become strategically necessary to factor in all possible
        • Nouveautés Zoho Flow - Intégration SAP S/4HANA et SAP HANA

          Bonne nouvelle! Deux applications très attendues dans la galerie d’intégrations de Zoho Flow sont désormais disponibles : ✨ SAP S/4HANA ✨ SAP HANA Que vous gériez des opérations d’entreprise ou des systèmes de données, ces intégrations vous permettent
        • Record/edit view to pop-up simultaneously with button click from report of a different form

          I have two forms: Form A & Form B. Form B contains all of the same fields of Form A, plus a few additional fields. I've created a button in the report view of Form A that creates a new record in Form B and populates all the applicable fields, (I've posted the code I used below), but visually nothing happens on the screen. If I want to finish filling out the remaining fields in Form B, I have to navigate to the report and open the record. How do I get this new record to just pop-up when I click the
        • How to get NSE/BSE Stock Prices in Zoho sheets?

          I've been looking for a function that provides me with the NSE/BSE listed stocks price in Zoho Sheets like GOOGLEFINANCE in Google sheets, but I found none. Please help if there is any way to het stock prices?
        • INVOICE DONT HAVE AN INCOME ACCOUNT FIELD TO POST TRANSACTIONS

          INVOICE DON'T HAVE AN INCOME ACCOUNT LIKE THE EXPENSE ACCOUNT FIELD IN THE EXPENSE MODULE. PLEASE CAN YOU TELL ME WHAT TO DO TO ADD THIS FIELD AND FUNCTION TO POST IT TO THE RIGHT INCOME ACCOUNT. THANK YOU VERY MUCH
        • Error in Deluge script, but all should be OK

          I get an error when using the following deluge script (sensitive info changed with ***). This script should parse a projectnumber out of the subject or body text and put it in a custom field of the ticket. The error: Validation failed for the condition
        • Problems with clipboard paste into ticket comments

          Problem as title. Using Chrome get to paste contents of clipboard but submit gives 'you've exceeded the character limit of 30,000 for this comment' irrelevant of actual number of characters. Edge just pastes txt 'undefined' irrelevant of actual contents of clipboard All other areas of Zoho desk work fine with clipboard paste (i.e. new ticket description) it's just comments on existing tickets that seem to have problem. Was all working fine until early yesterday (14th) Client is Windows 10 Pro 1803
        • Mapping Issue

          since, Tickets are already mapped with the Requestors and when we map Requestors with Organization, then Tickets are not visible under that Organization. Kindly solve this issue.
        • New features and improvements in Desk's integration with Zia powered by GPT 

          Hi everyone, We’re pleased to announce several new enhancements in Zia Powered by GPT integration. These updates bring more customization options, improved response generation, and additional language support. Below is an overview of the enhancements
        • Painéis do Zoho CRM ajudam na Gestão Comercial?

          A gestão do departamento comercial é uma questão fundamental para qualquer empresa. Uma boa gestão proporciona previsibilidade, alinhamento e melhores resultados. Acredito que todos que adquirem uma plataforma de CRM buscam uma gestão ágil e eficiente
        • Adding transferwise.com as an online payment method

          Hi, I am not a fan of using Paypal or google pay, can we look at introducing transferwise.com as a payment method as i think it will work better in the corporate world. https://transferwise.com/ Cheers
        • How to Bulk-Update Sales Orders in CRM

          Hi - I need to bulk update existing sales orders with dates from our ERP of when the sales orders were created. I made a date field on the Sales Order module where I want to insert that data. I can't Mass Update because I am not updating the fields to
        • How do mass change start date and end date?

          You can mass do everything else, so maybe I'm missing something. But if I have a bunch of tasks and want to assign multiple tasks within a date set, how do I do that without doing them one by one?
        • Announcing New Features in Trident for macOS (v.1.2.0)

          Hello Community, Trident for macOS has quite a few new features that will improve your business email communication. Let's take a quick look at them. Creating templates Earlier, you could save email drafts as templates in Trident. With the current update,
        • Products in time entry

          Morning, Is there a way to add the product field to the time entry layout? Giving us the ability to identify a product per time entry. Thanks Rudy
        • Zoho.eu and U.S. Cloud Act? Can U.S. request Zoho.eu data?

          Given the current political situation in the U.S. and possible near future implications for data privacy and security, I am curious about Zoho’s obligation to comply with the U.S. cloud act or other U.S. requests for private customer information from
        • Zoholics Europe Awards

          We're excited to announce that at this year's Zoholics events across Europe, we're holding customer awards for the first time ever! This is your chance to shout about the amazing things you've created, connected, or achieved with Zoho's developer application!
        • Why "balance due" for the VOIDED INVOICE is not zero?

          We wonder why the "balance due" for the VOIDED INVOICE is not zero? For example our case, we issued invoice for a client for MYR1000, then after client request for cancellation. Client haven't make payment yet. So we marked the invoice as void. We think
        • Format handling error

          Hi, I'm having an issue when merging a document using a custom function when with decimal numbers. In my template preview, it's seems correct ,but when I do the merge and attach the file to a record, all types of docs aren't displaying the number correctly.
        • Announcing New Features in Trident for macOS (v.1.20.0)

          Hello everyone! Trident for macOS is here with interesting features and enhancements to elevate your workplace communication and productivity. Let's take a quick look at them. Change the "From" email address easily. When composing or replying to an email,
        • Announcing new features in Trident for Windows (v.1.27.6.0)

          Hello Community, Trident for Windows is here with exciting new features to elevate your email communication. Let’s dive into what’s new! View and manage .pst files. A .pst (Personal Storage Table) file is an Outlook Data Storage file format for storing
        • Email limit reached

          I'm assessing whether zoho crm will work for our startup, however I tried to send emails to my leads and after 12 emails got the notification that email limit has been reached. That is ridiculously low. Whats wrong and how can you fix that. I am still
        • Importing Into Zoho CRM

          Do you have a list in Excel that you would like to import into Zoho CRM? If your administrator has not restricted your ability to import, the process is fairly easy to accomplish, but understanding the options can make everything go smoother. First you may need to prepare the spreadsheet Remove any extra rows from the top of the spreadsheet, like titles or blank lines. Row 1 should be the column headers. Row 2 should be where the data starts. Make sure that there is a column for any required fields
        • Analyze the Name of the Deal Owner and Created by

          I need to display the Name of the User who created a deal and the Deal Owner. Since both fields are lookups to the same table (Users), it defaults to the user record of the Deal Owner and I cannot display the name of who created it. I can generate the
        • Date Import Problems

          I'm trying to import products from csv/xls files, but I can't get the Sales Start Date field to import. I know the import is working because all the other information is imported, but the Sales Start Date field is left empty. I think it must be a format
        • Canvas and Related lists

          Hi, As much as I like canvas, when adding in a asection with related lists,it doesnt mimic the same functionality as the standard view within the CRM e.g left hand panel will show the module and total number of records. Is there a way of indicating this
        • New Search Function

          Hey Team, The search function updated in our CRM about a week ago, so I assume it was an automated update across Zoho. It no longer displays leads/deals etc in Chronological order so that the most recently created or updated is the first to display which
        • Problem with the "Search" function

          Hi, I've been using Workdrive for a few days and lately, the files I added in Workdrive don't appear in the search. It looks like my latest files aren't indexed. Are you aware of this issue ? 
        • Getting error "invalid warehouse_id" when trying to update any transaction in Zoho books

          I got a message from Zoho saying that the Warehouse and Branch has been merged into one category "Locations" Once I migrated to this setup I was no longer able to edit any invoice / create creadit notes - got an error saying "invalid warehouse_id" I never
        • Return "kit_quantity" when fetching Kit items via "List all the items" API call

          I have been appreciating the new Kits feature quite a bit, it is exactly what we were looking for in Zoho to solve many pain points. However, there is 1 problem I am running into and that is the fact there is no stock information that can be pulled for
        • Automating Pricing in Zoho Inventory Based on Brandline Quantity

          I am currently setting up my Zoho Inventory system and would like to implement an automatic pricing feature for sales orders. We have created a custom field called "brandline" for our items. All products with the same brandline value should have the same
        • Next Page