# SugarCRMQuery

Using this activity flows can query the SugarCRM system for the details of any record in any module. Records can be explicitly selected by their ID field or can be filtered.

## Configuration

The Configuration tab has the following fields that identify which SugarCRM connection to use and the type of object to create.

Field | Description
--- | ---
Connection | SugarCRM connection name to use when accessing the SugarCRM system. If you have created multiple SugarCRM connections, select the one you want to use from the drop down menu for this field.
Module | SugarCRM module name. Select the module type you want to create.

## Input Settings

You can add or remove the fields using Add Row or Delete Row buttons available below the fields label.

Field | Description
--- | ---
filter | Enter a JSON encoded filter string to allow the selection of specific records. Refer to the SugarCRM documentation for help on composing filters. This field validates the syntax of the JSON code for you.
fields | Controls the fields returned for each record in the result set. This is useful for reducing the amount of data transferred, and therefore the impact of the flow on the network and the server. Only the fields selected here will display in the Output tab.

## Input

Field | Description
--- | ---
ID | The ID field causes the query to return exactly one record if the ID matches the ID of an existing record. If the value in this field is present the filter, maxnum, and offset fields are ignored.
filter | Enter a JSON encoded filter string to allow the selection of specific records. Refer to the SugarCRM documentation for help on composing filters. Note: The JSON string that you enter here must be syntactically correct. Otherwise, you will encounter runtime errors. If you enter different JSON strings in the filter fields for Input Settings and Input tabs your result will be based on the filter value provided in Input tab. The filter value you entered in the Input Setting tab will be ignored.
maxnum | Controls the maximum number of records in the returned result set
offset | Offsets or skips a number of matching records before composing the result set.

## Output

The output data for this activity. The entire list of possible output fields is presented here, but only the fields selected in the query parameter will actually be used at runtime. The elements that you see in the schema can be mapped as input to the activities which follow this activity in the flow.

Related concepts
Overview
Related tasks
Creating a SugarCRM Connection
Related reference
SugarCRMCreate
ReceiveSugarCRMMessage Trigger
SugarCRMUpdate
SugarCRMDelete
Copyright © TIBCO Software Inc. All rights reserved.