# Salesforce Field Selection

DBSync Replication (Source to DB) allows choosing only the required fields for replication. There is an option to select only the required fields (including fields) and there is also an option to eliminate the unwanted fields (excluding fields).

***‘Salesforce Sync Object Details’*** tab in DBSync Cloud Replication shows Salesforce objects & fields name. Based on the requirement appropriate ***objects & fields*** must be selected either to exclude or include. Selection process is explained below with example.

![](https://help.mydbsync.com/docs/download/attachments/31983409/Objects.png?version=1\&modificationDate=1546340518000\&api=v2)

### Example to include required fields only: <a href="#salesforcefieldselection-exampletoincluderequiredfieldsonly" id="salesforcefieldselection-exampletoincluderequiredfieldsonly"></a>

Step 1: Salesforce Account Details are as shown below. Let us replicate only Name, Type, Fax & SLA fields into database.

![](https://help.mydbsync.com/docs/download/attachments/31983409/16.png?version=1\&modificationDate=1546340518000\&api=v2)

Step 2: In DBSync Cloud Replication, under ‘Sales Sync Object Details’ Tab, select ‘Account’. Move all the API names from ***Available Fields to Exclude Fields using >>***.&#x20;

<br>

![](https://help.mydbsync.com/docs/download/attachments/31983409/exclude.PNG?version=1\&modificationDate=1546340518000\&api=v2)

<br>

Step 3: Select Name, Type, Fax & SLA\_*c (***API name for SLA field{\_}**) in Exclude Fields (**Ctrl key must be used to select all these at once**) and move this to available fields (**using <**).  **Save** the selection and \*run \*the Replication Source to DB.

![](https://help.mydbsync.com/docs/download/attachments/31983409/Objects%20with%20run%20replication%20commands.PNG?version=1\&modificationDate=1546340518000\&api=v2)

Step 4: Confirm in Tomcat that replication was successful. Database will have only Name, Type, Fax & SLA\_c columns along with DO\_SYNC\_FLAG and other Id columns.

![](https://help.mydbsync.com/docs/download/attachments/31983409/19.png?version=1\&modificationDate=1546340518000\&api=v2)

### Example to exclude selected fields only: <a href="#salesforcefieldselection-exampletoexcludeselectedfieldsonly" id="salesforcefieldselection-exampletoexcludeselectedfieldsonly"></a>

Step 1: Salesforce Account Details are as shown below. Let us replicate all the fields in the Accounts Object except Billing Street and Billing City fields.

![](https://help.mydbsync.com/docs/download/attachments/31983409/20.png?version=1\&modificationDate=1546340518000\&api=v2)

Step 2: In DBSync Cloud Replication, under ‘Sales Sync Object Details’ Tab, select ‘Account’. Move Billing Street and Billing City fields from Available Fields to Exclude Fields using -**>** button. Save the selection and run the Replication Source to DB.

<br>

![](https://help.mydbsync.com/docs/download/attachments/31983409/Objects%20with%20run%20replication%20commands.PNG?version=1\&modificationDate=1546340518000\&api=v2)

<br>

Step 3: Confirm in Tomcat that replication was successful. Database will have all the accounts field columns along with DO\_SYNC\_FLAG and other Id columns except Billing Street & Billing City Columns.

![](https://help.mydbsync.com/docs/download/attachments/31983409/22.png?version=1\&modificationDate=1546340518000\&api=v2)

<br>

<br>

<br>


---

# 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.mydbsync.com/cloud-replication-main/v6/key-features/salesforce-field-selection.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.
