Modify News Publication Date
Can you please tell me how can I modify the publication date of the news items?
I allowed the PublishDate to visible from custom field options and it is displaying on the edit mode of news but when I update the publish date it does not update.
I am using sitefinity 4.1 SP3.
Can you please reply ASAP.
You can modify the publication date of the news items programmatically. Please consider the bellow sample:
Thanks for the reply,
I run this code but foreach loop I am getting following error
" An item with the URL '/2011/09/09/-بنك-دبي-الإسلامي-و-الأردن-دبي-كابيتال-و-دبي-انترناشونال-' already exists."
Can you please help me on this? I have more than 200 news I can't repopulate them.
Please come up with some solution.
The sample code that I have provided you with is a solution on how to achieve the desired results using the API, if you do not intend on having a custom field from the backdating process, then you can simply pass a valid date to the code and set the PublicationDate/DateCreated accordingly.
You also have the option to upgrade to our 4.2 SP1 release, which contains this functionality built - in the system.
the Telerik team