Modifying publication and created dates of news - Bugs & Issues - Bugs & Issues - Progress Community

Modifying publication and created dates of news

 Bugs & Issues

Modifying publication and created dates of news

  • Modifying publication and created dates of news
  • Hello teleric team. I started using sitefinity CMS a week ago. And I cant change the publication and created dates of the news item to back date, using next code:
    var Item = App.WorkWith().NewsItems().Where(nI => nI.Title.ToString() == "isa")
     //"isa" - title of my news item
    .ForEach(nI =>
               
                    var val = DateTime.Parse(NewDate.Text);
                    nI.PublicationDate = val;
                    nI.DateCreated = val;
                ).SaveChanges();

    And I got this: Exception has been thrown by the target of an invocation. Please, help me.
  • Hi,

    If you wish to change news publication back date, I would suggest taking a look at this blog post. This should guide in you in changing the news date.

    Please let us know if you have anymore questions.

    Kind regards,
    Grace Hallwachs
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items