How to I get checkboxes on a subform to update via deluge

How to I get checkboxes on a subform to update via deluge

Hello, would someone be able to tell me what I'm doing wrong here? 

I am trying to take the contents of a Deals subform and add them to an invoice then update the checkbox on each row so that 'add to invoice' is unticked and 'invoiced' is ticked.

The output of "checkboxmp" seems to show all the info I am expecting, but possibly not in the right format because on the actual deal page, it just clears all the fields in the subform except for the checkboxes...but the even checkboxes are not updated.

  1. // subform items
  2. sitems_returned = order.get("Storage_Subform");
  3. if(sitems_returned != null && sitems_returned.size() > 0)
  4. {
  5. subform_Update = List();
  6. // gets the subform items one by one
  7. for each  sitem in sitems_returned
  8. {
  9. itemtype = sitem.get(itemtype_field_api_name);
  10. sprice = sitem.get(storage_price_api_name);
  11. invoiced = sitem.get(invoiced_field_api_name);
  12. months = sitem.get(months_field_api_name);

  13.    if(!invoiced)
  14. {
  15. // Add each item to invoice map if not already invoiced
  16. sitemMap = Map();
  17. sitemMap.put("name",itemtype);
  18. sitemMap.put("description","Up to " + months + " months.");
  19. sitemMap.put("quantity",1);
  20. sitemMap.put("rate",sprice);
  21. sitemMap.put("tax_id",standardRateVatId);
  22. itemList.add(sitemMap);
  23. // checkbox update to show it has been invoiced now
  24. checkmp = Map();
  25. checkmp.put("Invoiced",true);
  26. checkmp.put("Add_to_Invoice",false);
  27. subform_Update.add(sitemMap);
  28. subform_Update.add(checkmp);
  29. checkboxmp = Map();
  30. checkboxmp.put("Storage_Subform",subform_Update);
  31. updateCheckbox = zoho.crm.updateRecord("Deals", orderId, checkboxmp);
  32. info checkboxmp;
  33.    }
  34. }

In case it helps, this is the output of checkboxmp:

checkboxmp{"Storage_Subform":[{"name":{"name":"Storage - Additional","id":"622308000029387251"},"description":"Up to 12 months.","quantity":1,"rate":300,"tax_id":"150337000000181013"},{"Invoiced":true,"Add_to_Invoice":false}]}

    • Sticky Posts

    • Kaizen #226: Using ZRC in Client Script

      Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
    • 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

    Nederlandse Hulpbronnen