contacts.contactInvoiceRefToContactID
Get the first found contact ID with the specified default invoice reference.
invoiceRef string
contactID number (< 1 if not found)
local contactID = contacts.contactInvoiceRefToContactID("CUSTOMER_001")
print(contactID)
Defualt invoice references are not required to be unique between contacts. This function is only effective if invoice references are not duplicated between different contacts.