Adapter for Salesforce 8.2 | webMethods Adapter for Salesforce Documentation | webMethods Adapter for Salesforce Installation and User’s Documentation | Adapter Services | Configuring Custom Query Operation Adapter Services | Configuring a Custom Query Operation Adapter Service
 
Configuring a Custom Query Operation Adapter Service
*To configure an adapter service using the Custom Query Operation template
1. Review the steps in Before Configuring or Managing Adapter Services.
2. Start Designer.
3. Right-click the package in which the service should be contained and select New > Adapter Service.
4. Select the parent namespace, type a name for the adapter service and click Next.
5. Select Adapter for Salesforce as the adapter type and click Next.
6. Select the appropriate Adapter Connection Name and click Next.
7. From the list of available templates, select the Custom Query Operation template and click Finish.
The adapter service editor for the adapter service appears. You can select the Adapter Settings tab at any time to confirm adapter service properties such as the Adapter Name, Adapter Connection Name, and Adapter Service Template, as necessary.
8. Select the Custom Query Operation tab to specify an SOQL statement and the associated input and output parameters.
a. Select the Include Deleted Records check box to include results from deleted records.
b. Use the icon and set the SOQL parameters as described in the table below.
Field
Description/Action
Salesforce SOQL Query
An SOQL statement. If you need more space to type your statement, use the launch icon to the right to open a text editor window. You can type the statement directly in this field, for example: SELECT Id, Name FROM Account WHERE Name = ‘Sandy’.
For variable names, use the ? variable placeholder for each variable. For example: SELECT Id, Name FROM Account WHERE Name = ?
Note:
If you use the ? placeholder variable in your SOQL statement, make sure that you enter the corresponding Input Field and Input Field Type information in the same order as they appear in your SOQL statement. In the example given earlier, Name corresponds to the first entry in the Input Field.
Note:
Do not end your SOQL statement with a semi-colon (;) or an exception will be generated.
Note:
You can paste text into this field from the system clipboard. However, you must not cut or copy text from this field to the clipboard for pasting into another application.
Input Field
The name of the input field.
Input Field Type
java.lang.String
Output Field
Output parameters are optional. You configure an output parameter only when you want to overwrite the default field name in the output result.
Note: 
While mapping the output fields, ensure that the data entered in the output field matches the field name provided in the SOQL statement.
Native Field Type
The native field type of the selected field. Salesforce supports various types of native fields: string, picklist, multipicklist, reference, base64, textarea, phone, id, url, email, encryptedstring, combobox, anyType, time, boolean, int, double, currency, percent, date, datetime. You need to select the appropriate field type.
Output Field Type
The Java data type for the selected native field type. The java field type is automatically selected, after you select the native field type.
9. Select File > Save to save the adapter service.