I am looking to extract the multilist , dropdown list field value of an item using PowerShell query.
$item = Get-Item -Path master -ID "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"
$rawIds = [Sitecore.Data.Fields.MultilistField]$item.Fields["My checklist field name"]
$selectedItems = $rawIds.GetItems()
foreach($selectedItem in $selectedItems){
$selectedItem.DisplayName
}
Error I am getting is You cannot call a method on a null valued expression