- warning in Developer Console that Debug Logs exceeded limit and some must be deleted in order to set new trace flags
- execute in DC (via Tooling API option in Query Editor)
Select Id from ApexLog
When returned rows mass-selected and Delete Rows option clicked
- Sometimes, the DC returns with 1+ popup dialog
INVALID_CROSS_REFERENCE_ID [object Object] : Invalid cross reference id
The only lookup field on ApexLog is
LogUserId and I could see that every ApexLog I was deleting shared the same
LogUserId. Every entry being deleted was a Location
SystemLog w/ Operation
Now I know there are many alternative ways of deleting these logs but what would cause these sporadic INVALID_CROSS_REFERENCE_ID errors? They could occur whether I deleted 200, 400, or 600 rows at once - each DC bulk deletion might surface 1..12 popup dialogs with no apparent correlation to what I was doing.
Hypothesis 1 - The LogUserId happens to be a user that is concurrently running other batch jobs while I'm trying to clean up logs from previous batch jobs. Some contention occurs during the DC bulk delete
Hypothesis 2 - DC itself is having challenges refreshing the results pane during the bulk deletion and these INVALID_CROSS_REFERENCE_ID refers to objects used by DC itself.