So I wanted to reload our Department and Division data in our Dev environment. All the records were in Draft state. I opened the Department form and selected all my records and clicked on the Delete button. Then I did the same with the Division form and clicked the Delete button, which just state-transitioned those records to a null state. Then I went to the Organization Hierarchy quick link from my portal. Now the tree doesn’t display and I get the following error:
“Please contact your system administrator. The tree control reported this error while trying to draw itself: There was an error in the database or the query definition.”
I thought it could be the cache. So I went into the Admin Console > Cache Manager, and refreshed the “Hierarchy Tree Data” and “Hierarchy Tree Data – with rebuild”. I checked the “Hierarchy Tree Cache Status”. The Organization hierarchy has not completed yet and the duration has been over 20 minutes. I only have less than 500 Department records and 20 Division records. So I am concerned that the rebuild shouldn’t take that long. How do I query or get the Organization hierarchy tree data back in order? Any suggestions?
So it looks like the only way to remedy this error is by retiring the records, and then deleting the records (which sets the TRIRECORDSTATESY to null), and then letting the Cleanup Agent run. After I did that, the Organization hierarchy was displaying correctly.