Operation Details
Description: Returns list of related legal actions for a case.
Sterotype: nsmulti
SQL
SELECT
  LEGALACTION.LEGALACTIONID,
  LEGALACTION.CASEID,
  LEGALACTION.STARTDATE,
  LEGALACTION.ENDDATE,
  LEGALACTION.STATUSCODE,
  ADMINLEGALACTION.LEGALACTIONNAMECODE
INTO
  :legalActionID,
  :legalActionCaseID,
  :startDate,
  :endDate,
  :statusCode,
  :name 
FROM
  LEGALACTION,
  ADMINLEGALACTION,
  CASEHEADER,
  CASERELATIONSHIP 
WHERE LEGALACTION.CONFIGLEGALACTIONID =ADMINLEGALACTION.LEGALACTIONID 
  AND CASEHEADER.CASEID =LEGALACTION.CASEID 
  AND 
  (
    
    (
      LEGALACTION.CASEID =CASERELATIONSHIP.CASEID 
      AND CASERELATIONSHIP.RELATEDCASEID = :caseID 
    ) 
    OR 
    (
      LEGALACTION.CASEID =CASERELATIONSHIP.RELATEDCASEID 
      AND CASERELATIONSHIP.CASEID = :caseID 
    ) 
  ) 
  AND CASERELATIONSHIP.STATUSCODE = :recordStatus