# slxGetContactID

### slxGetContactID(firstName, lastName, accountName)

Check the CONTACT table for the contact and return the ID if found.

### slxGetContactID(firstName, lastName, accountName, displayErrors)

Check the CONTACT table for the contact and return the ID if found. If there are no matches or multiple matches on the contact name, an error message will be thrown.

## Arguments

Argument | Data Type | Description
firstName | string | first name of the contact
lastName | string | last name of the contact
accountName | string | name of the account that the contact belongs to
displayErrors | boolean | If true and the name does not match, an error will be thrown DEFAULT FALSE

## Returns

String - valid contactID if found.

## Description

The OPPORTUNITY table contains three virtual fields that allow you to link opportunities. They are:

- vfContactID - link the opportunity to a contact
- vfProductID - link the opportunity to a product
- vfContactID - link the opportunity to a competitor

When creating Opportunity records, you will normally want to link the opportunity to a contact. If you have the Contact table as a parent of the Opportunity table, Inaport will automatically fill in the vfContactID field.

If you do not have the Contact table as a parent of Opportunity, you may want to use this function to get the correct competitor id, and then map this to the vfContactID field.

## Examples

Example | Returns | Description
slxGetContactID("Fred", "Smith", Acme Corp") | ID if found |

## See Also

slxGetContactId(), slxGetProductID()