Click or drag to resize
WebCrmApiRetrieveByQuery Method
Returns data basing on the given SELECT SQL parameters.

Namespace: dk.webCRM.ApiSync.WebService
Assembly: dk.webCRM.ApiSync.WebService (in dk.webCRM.ApiSync.WebService.dll) Version: 2.0.0.5 (2.0.0.5)
Syntax
public RetrieveByQueryResult RetrieveByQuery(
	string selectFields,
	string tables,
	string whereClause,
	string orderBy
)

Parameters

selectFields
Type: SystemString
A comma separated list of field names. Expressions and field aliases are not enabled.
tables
Type: SystemString
A single table name or a JOIN expression of any sort (INNER, LEFT, RIGHT or FULL). It may not include any sub queries. The expression in ON section must include only the following operations and functions: NOT, AND, OR, =, >, <, >=, <=, <>, LIKE, IS, UPPER, LOWER and LEN. It is enabled using string values, numbers and NULL.
whereClause
Type: SystemString
A filter expression. It must include only the following operations and functions: NOT, AND, OR, =, >, <, >=, <=, <>, LIKE, IS, UPPER, LOWER and LEN. It is enabled using string values, numbers and NULL. Operations may be groupped by brackets "(" and ")".
orderBy
Type: SystemString
A comma separated list of field names with ASC and DESC options.

Return Value

Type: RetrieveByQueryResult
Examples
// Login and get a webservice ticket
            WebCrmApiSoapClient proxy = new WebCrmApiSoapClient();
            ErrorStatus errorStatus;
            TicketHeader ticket = proxy.Authenticate("cm1111aaaaaa", "username", "password", out errorStatus);

            // Query data
            RetrieveByQueryResult result = proxy.RetrieveByQuery(
                ticket, "p_name, p_email", "person", "p_email<>''", "p_name");
See Also