public async Task <MicrosoftDynamicsCRMcontact> GetContactById(string id) { MicrosoftDynamicsCRMcontact result; try { // fetch from Dynamics. result = await Contacts.GetByKeyAsync(id); } catch (HttpOperationException) { result = null; } catch (Exception) { result = null; } return(result); }
public async Task <MicrosoftDynamicsCRMcontact> GetContactById(string id) { MicrosoftDynamicsCRMcontact result; string[] expand = { "contact_SharePointDocumentLocations" }; try { // fetch from Dynamics. result = await Contacts.GetByKeyAsync(contactid : id, expand : expand); } catch (HttpOperationException) { result = null; } catch (Exception) { result = null; } return(result); }