private void Button_Click(object sender, RoutedEventArgs e) { if (Salesforce_Marketing_Cloud_Scope.Design_VALIDCONN) { AuthToken = Salesforce_Marketing_Cloud_Scope.Design_AUTH; ServiceURL = Salesforce_Marketing_Cloud_Scope.Design_SERVICES; } ConvertModelToString tmp = new ConvertModelToString(); String search = tmp.ConvertModelItem(ModelItem.Properties["Search"].ComputedValue); if (search == null) { search = ""; } if (search.Trim().Length < 2) { search = "SELECT Name,Type,Status,ExpectedResponse,NumberSent,NumberOfLeads,NumberOfConvertedLeads,NumberOfContacts,NumberOfResponses,NumberOfOpportunities,NumberOfWonOpportunities,AmountAllOpportunities,AmountWonOpportunities,Owner.Name,CreatedDate,LastModifiedDate FROM Campaign WHERE isActive=TRUE LIMIT 100"; } SelectWizard wizard = new SelectWizard(AuthToken, ServiceURL, search, "campaigns"); wizard.ShowDialog(); if (wizard.SaveSearch) { ModelItem.Properties["Search"].SetValue(new InArgument <string> { Expression = new Literal <string>(wizard.SelectCMD) }); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (Salesforce_Marketing_Cloud_Scope.Design_VALIDCONN) { AuthToken = Salesforce_Marketing_Cloud_Scope.Design_AUTH; ServiceURL = Salesforce_Marketing_Cloud_Scope.Design_SERVICES; } ConvertModelToString tmp = new ConvertModelToString(); String search = tmp.ConvertModelItem(ModelItem.Properties["Search"].ComputedValue); if (search == null) { search = ""; } if (search.Trim().Length < 2) { search = "SELECT ID,EmailAddress,CreatedDate,Client.ID,PartnerKey,SubscriberKey FROM Subscriber WHERE ID>1"; } SelectWizard wizard = new SelectWizard(AuthToken, ServiceURL, search, "Subscriber"); wizard.ShowDialog(); if (wizard.SaveSearch) { ModelItem.Properties["Search"].SetValue(new InArgument <string> { Expression = new Literal <string>(wizard.SelectCMD) }); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (Salesforce_Marketing_Cloud_Scope.Design_VALIDCONN) { AuthToken = Salesforce_Marketing_Cloud_Scope.Design_AUTH; ServiceURL = Salesforce_Marketing_Cloud_Scope.Design_SERVICES; } //Command has issues ConvertModelToString tmp = new ConvertModelToString(); String search = tmp.ConvertModelItem(ModelItem.Properties["Search"].ComputedValue); if (search == null) { search = ""; } if (search.Trim().Length < 2) { search = "SELECT ID,Name,Client.ID,PartnerKey,Type,CreatedDate,ModifiedDate,CustomerKey,ObjectID,ObjectState FROM DataExtension WHERE ID>1"; } SelectWizard wizard = new SelectWizard(AuthToken, ServiceURL, search, "DataExtensionObject"); wizard.ShowDialog(); if (wizard.SaveSearch) { ModelItem.Properties["Search"].SetValue(new InArgument <string> { Expression = new Literal <string>(wizard.SelectCMD) }); } }
private async void Button_Click(object sender, RoutedEventArgs e) { String Error = ""; btTest.IsEnabled = false; try { if ((Salesforce_Marketing_Cloud_Scope.Design_AUTH == null) || (Salesforce_Marketing_Cloud_Scope.Design_AUTH.Trim().Length < 1)) { var task2 = await(new CmdRestAPI(new InitConnectionData().ReturnDict())).ExecuteAsync(); if (task2.ValidConnection) { Salesforce_Marketing_Cloud_Scope.Design_AUTH = task2.RespAuthToken; Salesforce_Marketing_Cloud_Scope.Design_SERVICES = task2.RespServiceURL; Salesforce_Marketing_Cloud_Scope.Design_SOAP = task2.RespSoapClient; Salesforce_Marketing_Cloud_Scope.Design_VALIDCONN = true; } } } catch (Exception ex) { Error = ex.ToString(); } btTest.IsEnabled = true; ConvertModelToString tmp = new ConvertModelToString(); String search = tmp.ConvertModelItem(ModelItem.Properties["Search"].ComputedValue); if (search == null) { search = ""; } SelectWizard wizard = new SelectWizard(Salesforce_Marketing_Cloud_Scope.Design_AUTH, Salesforce_Marketing_Cloud_Scope.Design_SERVICES, search); wizard.ShowDialog(); if (wizard.SaveSearch) { ModelItem.Properties["Search"].SetValue(new InArgument <string> { Expression = new Literal <string>(wizard.SelectCMD) }); } }