Custom fields from code

Custom fields from code

How do you reference custom fields on invoice items in code in Zoho Books?

I tried the following code but it failed when it tried to convert the custom field list to a list.

    lineItems = invoice.get("line_items").toList();
    for each  item in lineItems
    {
     item_CFs = item.get("custom_fields").toList();
     for each  item_cf in item_CFs
    {
     msg = msg + item_cf.get("value").toString();
        }
     }

    Zoho Marketing Automation
      Zoho Mail - CRM Integration

              Zoho Pagesense Resources

                Zoho SalesIQ Resources



                      Zoho TeamInbox Resources

                        Zoho DataPrep Resources



                          Zoho CRM Plus Resources

                            Zoho Books Resources


                              Zoho Subscriptions Resources

                                Zoho Desk Resources

                                  Zoho Projects Resources


                                    Zoho Sprints Resources


                                      Qntrl Resources


                                        Zoho Creator Resources


                                          Zoho WorkDrive Resources




                                              Zoho Campaigns Resources

                                                Zoho CRM Resources

                                                        Design. Discuss. Deliver.

                                                        Create visually engaging stories with Zoho Show.

                                                        Get Started Now