Adding Custom Fields to a Map

Adding custom fields to a Map in a Books function is not the same as it is in CRM. It’s not as simple as map.put(“api_name”, variable_name”). Instead, follow this format:

Map.put(“custom_fields”,{{“label”:”Custom Field 1″,”value”:Value 1},{“Label”:”Custom Field 2″,”value”:Value 2}});

Of course, if you just have one custom field, only use one “label” and “value”. But, if you have seven, follow the pattern to put all seven into the map in one line.

For more custom fields help, see our GitHub repository that explains more in depth how to work with them.