cf_tx_item(tx_item, code)

Function name Description
cf_tx_item(tx_item, code) Returns the value of custom fields stored against a tx_item (Invoice/Itemised credit in Smile) in the tx_item view.
Parameter name Description
tx_item The tx_item for which you wish to retrieve the custom fields.
code The code of the custom field you wish to retrieve.

The cf_tx_item(tx_item, code) function returns a specific custom field for a given tx_item.

For example, to list the value of a specific itemised invoice item custom field code, you could use:

SELECT smile02.cf_tx_item(tx_item, 'externalProductRef');
        code        |      value
 -------------------+-------------------
 externalProductRef | SO12345