get news letter from newsletter issue guid

Kashif Akram asked on June 28, 2021 03:59

Hi is there any method available in NewsletterInfoProvider to get newsletter from newsletter issue guid?

Correct Answer

Liam Goldfinch answered on June 28, 2021 10:05

Not directly I don't think, but you could get the newsletter issue first:

var newsletterIssue = IssueInfoProvider.GetIssueInfo(issueGuid, SiteContext.CurrentSiteID);

Then do a GetNewsletterInfo lookup using newsletterIssue.IssueNewsletterID:

var newsletter = NewsletterInfoProvider.GetNewsletterInfo(newsletterIssue.IssueNewsletterID);

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.