protected void OppPermissionsUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { e.Values["adx_create"] = OppCreateCheckBox.Checked; e.Values["adx_delete"] = OppDeleteCheckBox.Checked; e.Values["adx_acceptdecline"] = OppAcceptDeclineCheckBox.Checked; e.Values["adx_assign"] = OppAssignCheckBox.Checked; }
protected void OnItemUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { if (PrimaryContactList.SelectedItem == null || PrimaryContactList.SelectedIndex == 0) { e.Values["primarycontactid"] = null; return; } Guid contactId; if (!Guid.TryParse(PrimaryContactList.SelectedItem.Value, out contactId)) { return; } var contact = XrmContext.CreateQuery("contact").FirstOrDefault(c => c.GetAttributeValue <Guid>("contactid") == contactId); if (contact == null) { throw new ApplicationException(string.Format("Couldn't find contact with contactid equal to {0}.", contactId)); } e.Values["primarycontactid"] = contact.ToEntityReference(); }
protected void OnItemUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { e.Values["adx_profilemodifiedon"] = DateTime.UtcNow; e.Values["adx_profilealert"] = ProfileAlertInstructions.Visible = false; if (e.Values.ContainsKey("emailaddress1") && Contact.GetAttributeValue <bool>("adx_identity_emailaddress1confirmed") && !string.Equals(e.Values["emailaddress1"], Contact.GetAttributeValue <string>("emailaddress1"))) { e.Values["adx_identity_emailaddress1confirmed"] = false; } if (ShowMarketingOptionsPanel) { e.Values["donotemail"] = !marketEmail.Checked; e.Values["donotbulkemail"] = !marketEmail.Checked; e.Values["donotfax"] = !marketFax.Checked; e.Values["donotphone"] = !marketPhone.Checked; e.Values["donotpostalmail"] = !marketMail.Checked; } var languageContext = this.Context.GetContextLanguageInfo(); if (languageContext.IsCrmMultiLanguageEnabled) { object preferedLanguage; e.Values.TryGetValue("adx_preferredlanguageid", out preferedLanguage); UpdateCurrentLanguage((EntityReference)preferedLanguage, languageContext); } }
protected void OnItemUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { e.Values["adx_profilemodifiedon"] = DateTime.UtcNow; e.Values["adx_profilealert"] = ProfileAlertInstructions.Visible = false; if (ShowMarketingOptionsPanel) { e.Values["donotemail"] = !marketEmail.Checked; e.Values["donotbulkemail"] = !marketEmail.Checked; e.Values["donotfax"] = !marketFax.Checked; e.Values["donotphone"] = !marketPhone.Checked; e.Values["donotpostalmail"] = !marketMail.Checked; } }
protected void OnItemUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { e.Values["adx_profilemodifiedon"] = DateTime.UtcNow; e.Values["adx_profilealert"] = ProfileAlertInstructions.Visible = false; if (SetupConfig.OwinEnabled() && e.Values.ContainsKey("emailaddress1") && Contact.GetAttributeValue <bool>("adx_identity_emailaddress1confirmed") && !string.Equals(e.Values["emailaddress1"], Contact.GetAttributeValue <string>("emailaddress1"))) { e.Values["adx_identity_emailaddress1confirmed"] = false; } if (ShowMarketingOptionsPanel) { e.Values["donotemail"] = !marketEmail.Checked; e.Values["donotbulkemail"] = !marketEmail.Checked; e.Values["donotfax"] = !marketFax.Checked; e.Values["donotphone"] = !marketPhone.Checked; e.Values["donotpostalmail"] = !marketMail.Checked; } }
protected void OpportunityUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { if (UpdatePipelinePhase.Checked) { e.Values["stepname"] = PipelinePhase.SelectedItem.Text; e.Values["salesstagecode"] = int.Parse(PipelinePhase.SelectedValue); //var processCode = PipelinePhase.SelectedValue; } else if (ReturnToNetwork.Checked) { e.Values["closeprobability"] = 0; e.Values["adx_reasonforreturn"] = ReasonForReturn.SelectedIndex + 100000000; } e.Values["description"] = OpportunityNotes.Text; Guid id; if ((AssignToList != null && !String.IsNullOrEmpty(AssignToList.SelectedValue)) && Guid.TryParse(AssignToList.SelectedItem.Value, out id)) { e.Values["msa_partneroppid"] = id; } }
protected void OnItemUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { }
protected void ContactUpdating(object senders, CrmEntityFormViewUpdatingEventArgs e) { }
protected void ChannelPermissionsUpdating(object sender, CrmEntityFormViewUpdatingEventArgs e) { e.Values["adx_write"] = ChannelWriteCheckBox.Checked; e.Values["adx_create"] = ChannelCreateCheckBox.Checked; }