Hi guys,
Can anyone guide me how I can set a task or lead to a member or a team programmatically?
var proxyService = ConnectToCRM(CRMuri, CRMusername, CRMpassword); try { //String strLeadTopic = "New Lead at " + System.DateTime.Now.ToString(); Entity ipsLead = new Entity("lead"); ipsLead.Attributes["subject"] = crmLeadModel.LeadSubject; ipsLead.Attributes["firstname"] = crmLeadModel.FirstName; ipsLead.Attributes["lastname"] = crmLeadModel.LastName; ipsLead.Attributes["jobtitle"] = crmLeadModel.JobTitle; ipsLead.Attributes["telephone1"] = crmLeadModel.BusinessPhone; ipsLead.Attributes["mobilephone"] = crmLeadModel.MobilePhone; ipsLead.Attributes["emailaddress1"] = crmLeadModel.EmailAddress; ipsLead.Attributes["companyname"] = crmLeadModel.CompanyName; ipsLead.Attributes["websiteurl"] = crmLeadModel.CompanyWebsite; ipsLead.Attributes["address1_country"] = crmLeadModel.CompanyCountry; ipsLead.Attributes["description"] = crmLeadModel.Description; // User Service Proxy to create the entity object proxyService.Create(ipsLead); return true; } catch (Exception ex) { //throw new Exception("CMR Error occurred - " + ex.Message); return false; }