You need to sign in to do that
Don't have an account?
evodanh
How to create a campaign
I'm using Free trial for developer.
I want to create a campaign by using Salesforce API v9.0
//
After I run this codes, a new campaign that is created in Salesforce. However, StartDate, EndDate, BudgetCost, ActualCost of this campaign is null or no-value!
Please help me to solve my problem! Thanks.
I want to create a campaign by using Salesforce API v9.0
//
Sforce.Campaign campaign = new Sforce.Campaign();
campaign.Name = campaignName;
campaign.StartDate = startTime;
campaign.EndDate = endTime;
campaign.Type = "Other";
campaign.Status = "Planned";
campaign.BudgetedCost = (double)budget;
campaign.ActualCost = (double)cost;
Sforce.SaveResult[] results = null;
Sforce.Campaign[] campaigns =
new Sforce.Campaign[] { campaign };
results = Binding.create(campaigns);
//
After I run this codes, a new campaign that is created in Salesforce. However, StartDate, EndDate, BudgetCost, ActualCost of this campaign is null or no-value!
Please help me to solve my problem! Thanks.
Have you tried to debug the code? I think you should debug the code and see what are the values of startTime, endTime, Budget and Cost etc variables. Please also provide the complete function or code you are using to create a new campaign so that it is clear where the values for the above variable are coming from.
campaign.StartDateSpecified = true;