SaaS CMS has officially launched! Learn more now.

Permanently Mark as Being Edited from code



Does anyone know if it is possible to perform "Permanently Mark as Being Edited" on a page/block from code?

In edit mode this function is located in the Tools menu but I don't know how to activate this from code.



Jan 29, 2015 8:58


Try this:

var inUseRepository = ServiceLocator.Current.GetInstance<EPiServer.Shell.Notification.IInUseNotificationRepository>();

inUseRepository.AddInUseNotification(new InUseNotification
    AddedManually = true,
    ContentGuid = myPage.ContentGuid,
    CreateTime = DateTime.Now,
    LanguageBranch = myPage.LanguageBranch,
    Modified = DateTime.Now,
    User = "Hulken"
Jan 29, 2015 10:42

Thanks Mattias!

That worked perfectly.


Jan 29, 2015 11:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.