select i.organization_id
from iv_invoices i, cr_items ii
where ii.latest_revision = i.invoice_id
and ii.item_id = :invoice_id
update cr_items
set publish_status = 'live'
where item_id = :file_item_id
update acs_objects
set context_id = :invoice_folder_id
where object_id = :file_item_id