Division Order - Transfer Posted but Owner Amounts Did Not Transfer
🤔 Problem
The client reported that a ‘Posted’ transfer successfully moved the Letters of Intent (LOIs) of the DO Decks; however, the owner amounts were missing from the Owner Amount Screen for the corresponding transfer. The issue arose because the transfer did not complete successfully, resulting in the prior owner amounts being marked as ‘Inactive’ instead.
🌱 Solution
First verifiy the latest status of the transfer in the Workflow_Events table.
Confirmed that the transfer was successfully posted in the database.
There is a transfer_id column in the Owner Amounts Table. It was determined that Transfer #10772 → Transfer_id = 773, in Owner Amounts
We began by selecting all owner amounts where
upstream_owner_transfer_id = 773, which returned 8,668 records, consistent with the transfer data in the application.All these records are inactive and attributed to the original owner.
Upon searching for these original IDs as
prior_owner_amount_ids, we found zero results.Additionally, I was unable to identify any expected "To Owner Amounts" in the application.
This indicates that the owner amounts transfer did not complete successfully; it inactivated the original owner amounts but failed to generate new owner amounts for the three "To Owners" involved in the transfer.
Attached is a script designed to reactivate the owner amounts and remove the
lock_reasonfor those records. After executing the script, we successfully retrieved those owner amounts into a new transfer (#10799 in the aec-project), resulting in the anticipated outcome.
- CODE
update owner_amounts set active = 1 where upstream_owner_transfer_id = 773 update owner_amounts set lock_reason = NULL where upstream_owner_transfer_id = 773