# Site 8.1.x updates













function Execute8.1SiteUpdates






{






	SiteUpdate_8.1_01 8101






	#SiteUpdate_8.1_02 8101 Skip because of SiteUpdate_8.2_01






	SiteUpdate_8.1_03 8101






	SetTemplateVersion "8.1.0.1" -IgnoreWhenHigherVersion






}













# List: IVRQuestions, Field: wsp_ucc_Question






# Convert field to multi line






function SiteUpdate_8.1_01($patchVersion)






{






	if ($patchCheck -ge $patchVersion) 






	{






		return






	}













	$field1 = GetPnpField "wsp_ucc_Question"






	$field2 = GetPnpField "wsp_ucc_Question" "IVRQuestions"






	ConvertSingleLineToMultiLineField $field1






	ConvertSingleLineToMultiLineField $field2






}













# List: SettingValues






# Remove items (if any)






# Import new data






function SiteUpdate_8.1_02($patchVersion)






{






	if ($patchCheck -ge $patchVersion -or $newSite) 






	{






		return






	}













	UpdateSettingValues






}













# List: Voicemails






# Add field: wsp_ucc_vmd_initial_skill






# Update default view






function SiteUpdate_8.1_03($patchVersion)






{






	if ($patchCheck -ge $patchVersion) 






	{






		return






	}






	






	$listTitle = "Voicemails"






	AddPnPFieldFromXml '<Field Type="Text" Name="wsp_ucc_vmd_initial_skill" DisplayName="Initial Skill" Required="FALSE" Group="AnywhereNow" />' $null "wsp_ucc_vmd_initial_skill" $listTitle -IgnoreDuplicateException






	AddPnPView $listTitle "AllItems" "All Documents" 30 '<OrderBy><FieldRef Name="FileLeafRef" /></OrderBy>' @("DocIcon", "LinkFilename", "Modified", "Editor", "Caller", "Delivered", "DeliveredDate", "Flow", "RecordedDate", "wsp_ucc_vmd_max_retries", "wsp_ucc_vmd_agentsip", "wsp_ucc_vmd_processed", "wsp_ucc_vmd_result", "wsp_ucc_vmd_skill", "wsp_ucc_vmd_initial_skill") -Default -RemoveIfExists






}





