Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以从后面的代码中设置SitecoreCreated By中的值或Created Date项目字段?
Created By
Created Date
谢谢
只需使用项目的字段更新它,例如:
using (new Sitecore.SecurityModel.SecurityDisabler()) { item.Editing.BeginEdit(); item[Sitecore.FieldIDs.Created] = Sitecore.DateUtil.ToIsoDate(DateTime.Now); item.Editing.EndEdit(); }