Operation Details
Description: Search Org Unit Assigned to a given task by task id. Also the method returns required details to load Organization Unit home page.
Sterotype: nsmulti
SQL
SELECT
  ou.name,
  ou.organisationUnitID,
  ost.organisationStructureID
INTO
  :name,
  :organisationUnitID,
  :organisationStructureID 
FROM
  TaskAssignment ta,
  OrganisationUnit ou,
  OrganisationStructure ost,
  OrgUnitParentLink opl 
WHERE ou.organisationUnitID = ta.relatedID 
  AND ou.organisationUnitID = opl.organisationUnitID 
  AND ost.organisationStructureID = opl.organisationStructureID 
  AND opl.recordStatus = :recordStatus 
  AND ou.recordStatus = :recordStatus 
  AND ta.assigneeType = :bizObjType 
  AND ta.taskID = :taskID