WebCrmApiSearchOrganisation Method |
Returns a list of Organisation_ID’s (max 10000).
The list is sorted by name.
Namespace: dk.webCRM.ApiSync.WebServiceAssembly: dk.webCRM.ApiSync.WebService (in dk.webCRM.ApiSync.WebService.dll) Version: 2.0.0.5 (2.0.0.5)
Syntaxpublic SearchOrganisationResult SearchOrganisation(
int searchFieldNumber,
string searchValue,
string postcode,
SearchOptions options
)
Public Function SearchOrganisation (
searchFieldNumber As Integer,
searchValue As String,
postcode As String,
options As SearchOptions
) As SearchOrganisationResult
public:
SearchOrganisationResult^ SearchOrganisation(
int searchFieldNumber,
String^ searchValue,
String^ postcode,
SearchOptions options
)
member SearchOrganisation :
searchFieldNumber : int *
searchValue : string *
postcode : string *
options : SearchOptions -> SearchOrganisationResult
Parameters
- searchFieldNumber
- Type: SystemInt32
Identifies type of data used for the search:
- 1: Organisation name or organisation name – division name.
- 2: Telephone or fax number (Telephone 2 or fax for B2C version).
- X: Custom field value. X can be 101 to 116 (= custom field 1 to 16).
- Y: Extra custom field value. Y can be 201 to 208 ( = extra custom field 1 – 8 ).
- searchValue
- Type: SystemString
Value used for the search.
It may include "%" in the beginning or end as wild cards.
Search value must not exceed 50 characters in length. - postcode
- Type: SystemString
It can be blank or contain a postcode to limit the search. - options
- Type: dk.webCRM.ApiSync.BusinessLayer.EnumsSearchOptions
Enables specify additional search options:
IgnoreCase: indicates whether to ignore case.
Return Value
Type:
SearchOrganisationResultReturns error status and a list of organisation ID’s.
Remarks
When searching with searchFieldNumber = 1 (organisation/division name),
the options parameter is ignored and the search uses
a special case in-sensitive search algorithm where all spaces and special characters such as / , . - are ignored.
AS, A/S, APS, IS, I/S, LTD, INC, GMBH, SA, AB, at the end of the name must be omitted in the search.
AS, A/S, IS, I/S, SA, AB, at the beginning of the name must be omitted in the search.
Examples
WebCrmApiSoapClient proxy = new WebCrmApiSoapClient();
ErrorStatus errorStatus;
TicketHeader ticket = proxy.Authenticate("cm1111aaaaaa", "username", "password", out errorStatus);
SearchOrganisationResult result = SearchOrganisation(ticket, 1, "Johnson", "", SearchOptions.None);
See Also