private void SearchRecords(string term, Action<EntityCollection> callback, string entityType)
{
string fetchXml = _queryParser.GetFetchXmlForQuery(entityType,"QuickFind", term, SearchTermOptions.PrefixWildcard | SearchTermOptions.SuffixWildcard);
OrganizationServiceProxy.BeginRetrieveMultiple(fetchXml, delegate(object result)
{
EntityCollection fetchResult = OrganizationServiceProxy.EndRetrieveMultiple(result, typeof(Entity));
fetchResult.EntityName = entityType;
callback(fetchResult);
});
}