Trying to update functionality in v. 8.11, and having problems with displaying cancellation message...
private static void OnTrashing(IContentService sender, MoveEventArgs<IContent> e)
{
var content = e.MoveInfoCollection.FirstOrDefault()?.Entity;
if (content is null) return;
if (!e.CanCancel || !content.Published) return;
e.Messages.Add(new EventMessage(
"Kan ikke slette",
"Kontroller der er publiceret, kan ikke slettes.",
EventMessageType.Warning));
e.Cancel = true;
}
(The cancellation works fine.)
Having read other posts, but no luck finding anything with a solution.
Also tried .CancelOperation()
OnTrashing CancelOperation messages not working
Hi guys!
Trying to update functionality in v. 8.11, and having problems with displaying cancellation message...
(The cancellation works fine.)
Having read other posts, but no luck finding anything with a solution. Also tried
.CancelOperation()
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.