Need help with Deluge syntax for invoice item_custom_fields
I need to set the value of an Invoice item_custom_fields
The api_name is "cf_logo" and the value is from a custom picklist.
1. How can I get a list of all the "selected_option_id" values for the custom field "cf_logo"?
2. What is the complete PUT syntax to add it to my line Items map
Here's my attempt which fails
- // Make another map for the invoice line items
- invoice_item = Map();
- // The ID stored in the Deal subform is the zcrm_product_id. Use this to find the item_id in books.
- itemid = element.get("Product").get("id");
- zcrm_product_id = zoho.books.getRecords("Items",books_organization_ID,"zcrm_product_id=" + itemid,"books_items_all").toMap();
- // Assemble the Invoice line item
- invoice_item.put("item_id",zcrm_product_id.Get("items").get(0).toMap().get("item_id"));
- invoice_item.put("quantity",item.get("Quantity").toString());
-
- custom_fields = list();
- custom_field_size = map();
- custom_field_size.put("Size", "cf_size");
- custom_field_size.put("value", ifnull("2274626000003483460",""));
- custom_fields.add(custom_field_size);
- invoice_item.put(custom_fields);