I'm creating a template and assigning a workflow to that template. But the items which are created from that template are not having the workflow value.

$template = New-Item  -Path "/sitecore/templates/Sensoft" -Name $importData.TemplateName -type "{AB86861A-6030-46C5-B394-E8F99E8B87DB}"
$template."__Icon" = $importData.TemplateIcon
$sectionValue = New-Item -Parent $template -Name $importData.SectionName -type "{E269FBB5-3750-427A-9149-7AA950B49301}"
$standardvalues = New-Item -Parent $template -Name "__Standard Values" -type $template.ID
$standardvalues.'__Default workflow' = $importData.WorkFlowID

I think its because of the standard values which i have created. Can anyone help me in creating the standard values and assigning workflow to it.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.