Skip to main content

Using Custom Fields

QuickBooks allows you to use Custom Fields for Invoices and a few other things. We don't use them in our Simple Starter, but you can add them yourself.  They are a little different than other types of fields. You'll need to set them up in your Company Settings in QuickBooks Online.  You'll also want to check there so you can see the order in which they appear.  Once you have that done this is how to work with them.

Custom Field in Quickbooks JSON

Custom Fields are put in an Array. Notice the "[" at the beginning and the end of the CustomField property. That's your clue it's an array. The array is ordered in the way they appear in your custom settings.  Also important to note is the DefinitionId is in that array as well.  So, the first Custom Field will have a DefinitionId of 1, the second is 2, etc. Also note it has several properties, three of which are required when updating or creating an invoice.  The only one that isn't is "Name".

Sending

In this section of a script notice, how we build up the Custom Field with a calculation that sets each property in the array.

Invoice :: Field Map :: Get

Setting into FileMaker

Getting the value out of a Custom Field is easier since all we need to worry about is the StringValue.  Here in the Invoice :: Field Map :: Set Script we get the WorkOrder Number.