If ($ParentWorkItemID -like "SR*") {
    $WorkItemClass = Get-SCSMClass System.WorkItem.ServiceRequest$
    $WorkItemTypeProjection = "System.WorkItem.ServiceRequestProjection" }

    ElseIf ($ParentWorkItemID -like "IR*") {
    $WorkItemClass = Get-SCSMClass System.WorkItem.Incident$
    $WorkItemTypeProjection = "Xapity.ActionLog.TypeProjection.Incident"}

    ElseIf ($ParentWorkItemID -like "PR*") {
    $WorkItemClass = Get-SCSMClass System.WorkItem.Problem$
    $WorkItemTypeProjection = "Xapity.ActionLog.TypeProjection.Problem"}