EConnectWebServiceException Invalid object name 'AAG20000'

EConnectWebServiceException Invalid object name 'AAG20000'

Having renamed the entire Analytical Accounting database objects in the company database, using a script derived from KB915903 eConnect started immediately creating errors so I went to investigate.

Invalid object Name AAG20000

Having opened up the eConnect scripts to see what was going on (taProcessAnalytics, taCreateSOPDistributions, taAnalkyticsDistribution among others), it became apparent what the issue was.
See how the AA stuff is wrapped in a check for the AAG table in the DYNAMICS database.

I had not yet ran the script on the DYNAMICS database to rename the objects there. So tables AAG00100-AAG00105 still existed in the DYNAMICS database which is what eConnect uses to decided if it needs to create AA records. Once these objects were renamed in the DYNAMICS database, as shown below, eConnect started behaving again.

The next step will be to actually drop all the tagged "to delete" objects from the database. I work this way to give myself a easy regression should it be needed.