Internal - Division Order - Discarded or Posted Division Order Records Don't Unlock
If a client submits a ticket that lines of interest and/or owner amounts are locked, even though the record is posted or discarded, these are the steps you can take to unlock the records.
📘 Instructions
Gather all information from the client
Take an internal refresh
Ask the client for the Lock Reason on the data
The client can find the Lock Reason by scrolling to the right on the Lines of Interest or Owner Amount grids. The grid should state what transfer, suspense, or release record is locking the LOI and/or Owner Amounts.
Once the Client provides a type (suspense, transfer, etc.) and number, confirm in the UI of our internal application the number is not in workflow or draft by doing the following:
If the issue is a transfer number
Search to see if the transfer number exists in Division Order>Owner Transfers.
If the transfer number is here, let the client know someone is currently editing the records, and they will need to ask the user to discard or submit the record.

If the transfer number does not exist, move onto the scripting steps.
If the issue is a suspense number
Search to see if the number exists Division Order>Owner Suspense.
If the record exists in Draft or Submitted status, let the client know the record needs to be discarded or submitted if in draft or approved/rejected if in submitted status. No scripting needs to be done.
If the record does not exist or is marked as a Posted status, move onto the scripting steps.
If the issue is a release number
Search to see if the number exists Division Order>Owner Release.
If the record exists in Draft or Submitted status:
Let the client know the record needs to be discarded or submitted if in draft or approved/rejected if in submitted status. No scripting needs to be done.
Script the bad data out
By running the select statements in the scripts below or looking in the application itself, make sure to note an owner number that is locked by the bad data
In the application you can see what record is causing an issue, by searching for the record number with a wildcard (%) under the Lock Reason in a new transfer record in the DO Lines of Interest and Owner Amounts grid.


See the attached script templates to remove the bad data. These templates are record type specific.
Once the data is updated, go into the WEnergy Internal copy.
Navigate to Division Order>Owner Transfers
Create New Transfer.
Search for the owner number notated in step 1 under the DO Lines of Interest grid.
Do the lines have a blank lock reason to the right on the grid? Then move onto the next steps.

If there is still a lock reason for the record you were trying to unlock, review the scripts again.
Scroll down to the owner amounts grid, search for the owner number that was an issue.
Do the lines have a blank lock reason to the right on the grid? The script worked successfully.

If there is still a lock reason you were expecting to be gone, review the scripts.
Discarded or Posted Transfer Locking Records.sql Discarded or Posted Release Locking Records.sql Discarded or Posted Suspense Locking Records.sql