Click or drag to resize
WebCrmApiReadFromWebcrmByDates Method
Returns a list of entities basing on date criteria.

ReadFromWebcrmByDates is deprecated, please use ReadFromWebcrmByDatesDirect instead.

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 WebCrmDataCollection ReadFromWebcrmByDates(
	DataEntityType entityType,
	DateTime fromDateTime,
	DateTime toDateTime,
	DateFilterType dateMode
)

Parameters

entityType
Type: dk.webCRM.ApiSync.BusinessLayer.EnumsDataEntityType
Entity type.
fromDateTime
Type: SystemDateTime
Date from which the search begins. The date cannot be before January 1st 2000.
toDateTime
Type: SystemDateTime
Date after which the search ends. The date cannot be after December 31st 2200.
dateMode
Type: dk.webCRM.ApiSync.BusinessLayer.EnumsDateFilterType
Identifies date field used for the filter:
  • 0: the record create date is used as matching criteria.
  • Any other values: the record update date is used as matching criteria.

Return Value

Type: WebCrmDataCollection
Returns error status and a list of entities.
Examples
// Login and get a webservice ticket
WebCrmApiSoapClient proxy = new WebCrmApiSoapClient();
ErrorStatus errorStatus;
TicketHeader ticket = proxy.Authenticate("cm1111aaaaaa", "username", "password", out errorStatus);

// Read from webCrm
DateTime fromDate = new DateTime(2000, 12, 1);
DateTime toDate = new DateTime(2010, 10, 7);
WebCrmDataCollection collection = proxy.ReadFromWebcrmByDates(ticket,
        DataEntityType.Activities, fromDate, toDate, DateFilterType.ByCreationDate);
See Also