Modifying campaigns

To modify a specific campaign, you use the NewslettersManager class. The following code modifies a campaign through the Native API.

 

public void ModifyCampaign(Guid id, string newName)
{
    NewslettersManager manager = NewslettersManager.GetManager();
    Campaign campaign = manager.GetCampaigns().Where(c => c.Id == id).SingleOrDefault();
 
    if (campaign != null)
    {
        campaign.Name = newName;
 
        manager.SaveChanges();
    }
}

 

First, you initialize the NewslettersManager. Then, you must get the specified campaign. Finally, you modify the title and save the changes.

See Also

Other Resources

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK