As part of implementing some custom approvals code, I want to intercept a content move and show the current location (parentId) and proposed destination location (?) when the BeforeMove event is fired. Is there any way I can capture the id of the destination chosen in the popup dialog so that I can pass it to my approvals code? This would be so that once the approval has been approved I can call the Move API and pass it the required id. I've googled around but the only examples I can find all use static hard-coded page ids.
Found the solution so posting here in case anyone else comes across this. Basically don't use the umbraco.cms.businesslogic.web.Document.BeforeMove event, use Umbraco.Core.Services.ContentService.Moving and Moved - these give you a lot more info in the Entity object and crucially the MoveEventArgs includes the ParentId for the desired destination.
How to get destination id from BeforeMove event
As part of implementing some custom approvals code, I want to intercept a content move and show the current location (parentId) and proposed destination location (?) when the BeforeMove event is fired. Is there any way I can capture the id of the destination chosen in the popup dialog so that I can pass it to my approvals code? This would be so that once the approval has been approved I can call the Move API and pass it the required id. I've googled around but the only examples I can find all use static hard-coded page ids.
Found the solution so posting here in case anyone else comes across this. Basically don't use the umbraco.cms.businesslogic.web.Document.BeforeMove event, use Umbraco.Core.Services.ContentService.Moving and Moved - these give you a lot more info in the Entity object and crucially the MoveEventArgs includes the ParentId for the desired destination.
is working on a reply...