private bool ValidateInput() { List <string> errors = new List <string>(); if (String.IsNullOrEmpty(ExternalAttributeDropDownListEx.SelectedValue)) { errors.Add(GetString("sf.mapping.noexternalattributeselected")); } foreach (EntityAttributeModel attributeModel in AttributeModels.Where(x => !x.IsNullable && !x.HasDefaultValue)) { MappingEditorItem control = null; if (MappingItems.TryGetValue(attributeModel.Name, out control)) { if (control.MappingItem == null) { string error = String.Format(GetString("sf.mapping.requiredattributemappingmissing"), attributeModel.Label); errors.Add(error); } } } if (errors.Count > 0) { SalesForceError.Report(GetString("sf.mapping.validationerror"), errors); return(false); } return(true); }
protected void ConfirmButton_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(ClientIdentifierTextBox.Text) || String.IsNullOrEmpty(ClientSecretTextBox.Text)) { SalesForceError.Report(GetString("sf.authorization.missingconsumerinput")); } else { Credentials.ClientId = ClientIdentifierTextBox.Text; Credentials.ClientSecret = ClientSecretTextBox.Text; try { StoreParameters(); SalesForceAuthorizationHelper authorizationHelper = new SalesForceAuthorizationHelper(Credentials.ClientId, Credentials.ClientSecret, RedirectUrl); string authorizationUrl = authorizationHelper.GetAuthorizationUrl(ParametersId); Response.Redirect(authorizationUrl, false); } catch (Exception exception) { HandleError(exception); } } }
private void HandleError(Exception exception) { SalesForceError.Report(exception); EventLogProvider.LogException("Salesforce.com Connector", "MappingEditorPage", exception); }
private void HandleError(Exception exception) { SalesForceError.Report(exception); EventLogProvider.LogException("Salesforce.com Connector", "ScoreFormControl", exception); }
private void HandleError(Exception exception) { SalesForceError.Report(exception); Service.Resolve <IEventLogService>().LogException("Salesforce.com Connector", "MappingFormControl", exception); }
private void HandleError(Exception exception) { SalesForceError.Report(exception); EventLogProvider.LogException("Salesforce.com Connector", "AuthorizationSetupPage", exception); }
private void HandleError(Exception exception) { SalesForceError.Report(exception); Service.Resolve <IEventLogService>().LogException("Salesforce.com Connector", "AuthorizationSetupPage", exception); }