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 SOQL Statement
 
Configuring a Custom SOQL Statement
Custom SOQL uses the ? placeholder variable to map part of the SOQL statement to the input field. At design time, you need to add an input parameter for each ? placeholder variable in the SOQL statement.
For example, in the following SOQL statement:
SELECT Account.Id, Account.Name, (SELECT Contact.FirstName, Contact.LastName
FROM Account.Contacts) FROM Account where Name IN (‘XXX’)
if you want to pass values for Account.Id and the where condition at run time, write the following SOQL statement:
SELECT ?, Account.Name, (SELECT Contact.FirstName, Contact.LastName
FROM Account.Contacts) FROM Account ?
In this case, you need to add two input parameters - AccId and whereCondition. When the service executes, specify the following values for the parameters:
*AccId = Account.Id
*whereCondition = where Name IN (‘XXX’), where XXX is the actual account name