Operation Details
Description: Reads all cases of the specified type for the specified user. If case type code is left undefined, all cases for the user will be returned.
Sterotype: nsmulti
SQL
SELECT
  CaseHeader.caseID,
  CaseHeader.caseTypeCode,
  CaseHeader.startDate,
  CaseHeader.statusCode,
  ConcernRole.concernRoleID,
  ConcernRole.concernRoleName,
  ConcernRole.concernRoleType
INTO
  :caseID,
  :caseTypeCode,
  :startDate,
  :statusCode,
  :concernRoleID,
  :concernRoleName,
  :concernRoleType 
FROM
  CaseHeader,
  ConcernRole,
  CaseUserRole,
  OrgObjectLink 
WHERE OrgObjectLink.userName = :userName 
  AND OrgObjectLink.orgObjectLinkID = CaseUserRole.orgObjectLinkID 
  AND CaseUserRole.caseID = CaseHeader.caseID 
  AND 
  (
    CaseHeader.caseTypeCode = :caseTypeCode 
    OR :caseTypeCode IS NULL 
  ) 
  AND CaseHeader.statusCode <> :statusCode 
  AND CaseUserRole.typeCode = :typeCode 
  AND ConcernRole.concernRoleID = CaseHeader.concernRoleID