-
-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
area-commandsInvolves functions and cmdlets.Involves functions and cmdlets.🌈 improvementExtra sugar and spice.Extra sugar and spice.🎨 area-user-interface🤩-release-highlightExciting change that should be highlighted in the release notes and celebrated by SPE fans.Exciting change that should be highlighted in the release notes and celebrated by SPE fans.
Milestone
Description
Expected Behavior
When executing scripts operating on the currently selected item in Content Editor ore renaming it, it would be beneficial to be able to refresh the content tree or reload the current item.
This functionality is now added to two Cmdlets - Send-SheerMessage and Invoke-JavaScript:

$item = $SitecoreContextItem
Send-SheerMessage -OnScriptEnd -Name "item:refresh" -Parameters @{id=&{$item.ID};language=&{$item.Language};version=&{$item.Version}}
Invoke-JavaScript -OnScriptEnd -Script "scForm.invoke('item:refresh(id=$($item.ID),language=$($item.Language),version=$($item.Version))')"
Send-SheerMessage -OnScriptEnd -Name "item:refreshchildren" -Parameters @{id=&{$item.Parent.ID}}
Invoke-JavaScript -OnScriptEnd -Script "scForm.invoke('item:refreshchildren(id=$($item.Parent.ID))')"
Send-SheerMessage -OnScriptEnd -Name "item:refreshchildren" -Parameters @{id=&{$item.ID};language=&{$item.Language};version=&{$item.Version}}
Invoke-JavaScript -OnScriptEnd -Script "scForm.invoke('item:refreshchildren(id=$($item.ID),language=$($item.Language),version=$($item.Version))')"
Close-WindowThis can be used in the Content Editor Context menu and List View Actions.
Solves e.g. the problem described in #1316
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-commandsInvolves functions and cmdlets.Involves functions and cmdlets.🌈 improvementExtra sugar and spice.Extra sugar and spice.🎨 area-user-interface🤩-release-highlightExciting change that should be highlighted in the release notes and celebrated by SPE fans.Exciting change that should be highlighted in the release notes and celebrated by SPE fans.