# Common Salesforce Errors

This page list all common Salesforce integration errors, what they are and how to fix them. You can find all sync errors in the [Connector Logs](https://app.goodfit.io/settings/connector-logs) page.

### Text Too Long

Usually happens because the field GoodFit is trying to sync to is set to Text type and the permitted length is shorter than field we're trying to sync. In order to fix this issue we typically recommend changing the field type to Text Area (Long).

{% embed url="<https://www.loom.com/share/290a10286b8e4697adb6b207e725ccbb?sid=c00c59ee-4147-442d-8837-bbd21d63dc69>" %}

**Step By Step:**

1. Go to Setup -> Object Manager -> Account or Contact.
2. Click on the field with issue and click Edit -> Edit Field Type
3. Choose "Text Area (Long)" from option list.
4. Set Length to 131072 (so you'll definitely won't have this issue again) and visible lines to 2 (default).
5. Click Save.

### Invalid value for picklist field

Usually happens because the field GoodFit is mapping to doesn't allow for new picklist value creation. This is because when the field has been created "Restrict picklist to values defined in the value set" option was ticked.

{% embed url="<https://www.loom.com/share/bc978c9218ae45a6a5cbaab8c6f9b632?sid=4de212dc-d286-4a25-ad86-1395a84f72a9>" %}

**Step By Step:**

1. Go to Setup -> Object Manager -> Account or Contact.
2. Click on the field with issue and click Edit.
3. Uncheck "Restrict picklist to values defined in the value set" option.
4. Click Save.

### Too many picklist options created for field

This error indicates that there's a GoodFit property that is mapped to a Picklist or a Multipicklist field type but it has too many potential values (more than 1000). In order to fix this error the field type should be changed to Text Area (Long).

Unfortunately, Salesforce doesn't return the name of the field name that throws this error. If you encounter it in your [Connector Logs](https://app.goodfit.io/settings/connector-logs) please give us a shout at <cs@goodfit.io> and our team will help you identify problematic field.

To change it follow the same steps as for [Text Too Long issue](#text-too-long):

{% embed url="<https://www.loom.com/share/290a10286b8e4697adb6b207e725ccbb?sid=f637294b-e537-4967-8135-6e400a892332>" %}

**Step By Step:**

1. Go to Setup -> Object Manager -> Account or Contact.
2. Click on the field with issue and click Edit -> Edit Field Type
3. Choose "Text Area (Long)" from option list.
4. Set Length to 131072 (so you'll definitely won't have this issue again) and visible lines to 2 (default).
5. Click Save.

### Value outside of valid range on numeric field

This error occurs if the allowed length of the numeric field has been set to too small value - i.e. Length is set to 2 but the value is 100 (three-digit). To fix this issue we recommend changing the Length to 16 (and Decimal Place to 2 if the field typically has decimal numbers as well i.e. Percentage).

{% embed url="<https://www.loom.com/share/0b5b6df6359249f1a262c32e7d2fc0fa?sid=85cdc820-4fd1-40f7-8368-d8f14d66b0fa>" %}

**Step By Step:**

1. Go to Setup -> Object Manager -> Account or Contact.
2. Click on the field with issue and click Edit
3. Change Length to 16 (and optionally Decimal Place to 2)
4. Click Save.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goodfit.io/goodfit-docs/product/integrations/salesforce/common-salesforce-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
