You are here: Create a Query script, Studio for Salesforce

Create a Query script to download data from Salesforce

You can run a query to download existing data from Salesforce. You can also put conditions on the query—for example, all the records posted last week or all the accounts with more than 100 employees.

Studio for Salesforce supports two kinds of queries:

Single object: In a single object query, you can download fields for the object and its parent object.

Master detail: In a master detail query, you can download data for multiple objects in one query. For more information, see Master Detail: Download data for multiple objects.

Before you run the query, be sure to enter how many records you want returned or to check the All box.

Start the Query script

  1. Click the File tab, and then click New.
  2. Click Query.
  3. Under Select Operation type, click Single Object.

Log in to Salesforce and choose an object

Log in

Winshuttle for Salesforce offers three ways to log in: Web Login, Autologon, and Credentials. For Web Login, you do not need to provide a security token.

If you need to schedule a task, click the Client Login tab and log in using a stored autologon name, or click Credentials and set up a new autologon name.

Web login

  1. Click the Web Login tab.
  2. Click Read Session Data.
  3. In the Environment list, click Production, Sandbox, or Custom.

    Winshuttle for Salesforce provides the URL for the production or test environment. If you choose Custom, type the URL for the custom environment.

  4. Click Go.
  5. Type your user name and password and then click Log in to Salesforce.
  6. Click Login or Okay.

Log in with credentials

If you do not have auto logon credentials stored in Winshuttle for Salesforce, do the following:

  1. Click Credentials, and type your email address, Salesforce password, and security token.
  2. For the Login URL, choose an environment.
  3. Check the Autologon Name box, and type a name for the auto logon credentials.

Use Auto Logon credentials

To log in with stored credentials, click the credentials you that you want to use, and then click the OK button or the Login button.

Important: Auto logon credentials work for a single user on a single computer. You cannot copy the autologon credentials and use them on a different computer or for different users on the same computer.

If you want to change your password or security token, click Edit, make the changes, and then click the Login button.

Choose an object

  1. Click Standard Objects or Custom Objects, and then click the Salesforce object that you want to create records for.

    list of standard objects

    If you do not see the object that you want in the list, click the All Objects tab, and type the name of the object you want in the Search box.

    Note: For help determining which objects to use, see the diagrams on Salesforce.com.

  2. If the object supports multiple layouts, choose the layout that you want, and then click OK.
  3. To access parent object data for a query, check the Read fields of parent objects box. (This option does not apply to Create operations.)
  4. Click Microsoft Excel - Column Based Mapping or Microsoft Excel - Cell Based Mapping. For more information about cell-based mapping, see Use cell-based mapping.
  5. Click Next.

Note: To include parent object fields use them in an instant query, check the Read fields of parent objects box before you click Next.