Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }