contacts.contactInvoiceRefToContactID
Description
Get the first found contact ID with the specified default invoice reference.

Parameters
invoiceRef string

Return value
contactID number (< 1 if not found)

Example
local contactID = contacts.contactInvoiceRefToContactID("CUSTOMER_001")
print(contactID)

Comments
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.

See also
contacts.getContactDefaultInvoiceRef
contacts.setContactDefaultInvoiceRef

Back