When we create item in a Sitecore bucket folder using PowerShell Extensions like shown below:

New-Item -Path "$PathofBucketFolder" -Name $TitleofanItem -ItemType $TemplateofanItem

Item gets created in the bucket based on the rule we have set but it does not get focused. I mean After the item is created author has to go to the folder and see. Where as in normal sitecore way when we create the item in bucket ,the newly created item is navigated automatically by sitecore in the content editor.

So my question is, is it not possible to navigate to the item when the item is created using PowerShell Extensions.

  • Assuming you're talking about the Content Editor, the Item won't get focused unless it's part of the standard Create Item dialog in the Shell. i.e. you have to select the parent and then an Insert Option. (Either Data Template or Branch Template). When is the code above firing, and how do you trigger it? – Sergeant Sitecore Oct 5 '17 at 13:56
  • Sergeant Sitecore Thanks for your response. We have implemented powershell script using command (i.e. in ribbon). Script will help to create item based on parameter passed i.e. tempalate , item title etc.. We have used sitecore powershell extension module for this. Let me know if you need any other details. Looking forward to hear from you. Thanks – Chirayu Brahmbhatt Oct 6 '17 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.