The 'Delete' button only removes the message at header but not the records in child table. 


The earlier version of 'Message/Alerts Cleanup' wizard does not remove the child records as well. Tested in SBO 10.0 FP2305 the 'Message/Alerts Cleanup' function remove records in child tables.



Script to view tables that stored Alert Messages. 



--DROP TABLE #Alerts
IF OBJECT_ID('tempdb.dbo.#Alerts', 'U') IS NULL

Create Table #Alerts
(
RecId int IDENTITY(1,1),
OAIB int,
OAOB int,
AOB1 int,
OALR int,
ALR1 int,
ALR2 int,
ALR3 int
)

INSERT INTO #Alerts

SELECT
(SELECT count(*) FROM OAIB) AS OAIB,
(SELECT count(*) FROM OAOB) AS OAOB,
(SELECT count(*) FROM AOB1) AS AOB1,
(SELECT count(*) FROM OALR) AS OALR,
(SELECT count(*) FROM ALR1) AS ALR2,
(SELECT count(*) FROM ALR2) AS ALR2,
(SELECT count(*) FROM ALR3) AS ALR3

SELECT * FROM #Alerts

SELECT Top 3 * FROM OAIB ORDER BY AlertCode
SELECT Top 3 * FROM OAOB ORDER BY AlertCode
SELECT Top 3 * FROM AOB1 ORDER BY AlertCode
SELECT Top 3 * FROM OALR ORDER BY Code
SELECT Top 3 * FROM ALR1 ORDER BY Code
SELECT Top 3 * FROM ALR2 ORDER BY Code
SELECT Top 3 * FROM ALR3 ORDER BY Code



Please submit ticket to SAP request a corrective SQL Script. 


By using the correction query, you agree with liability conditions described in the following disclaimer

SAP SE assumes no responsibility for errors or omissions in the information or material included. SAP SE does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained. Any information or material included is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. This applies in particular to any instructions or recommendations included. SAP SE shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of the information or material included. This limitation shall not apply in cases of intent or gross negligence. The statutory liability for personal injury and defective products is not affected.

If you do not agree with the disclaimer, please contact the support organization for further processing of the reported issue.

You can run the fix on the productive database provided that:
1. You have tested the solution in a copy of the productive database and verified that the solution resolves the reported issue.
2. You make a backup of the productive database before and after the fix. Keep the backups for a reasonable time; we recommend 3-6 months after the fix.
3. No user, add-on, or any other customization updating the data is connected to the database during the fix.

--- The fix queries:

IMPORTANT: This will remove all alert messages from all users, please make sure to discuss this with customer before executing it on production database:

truncate table OALR;
truncate table ALR1;
truncate table ALR2;
truncate table ALR3;
truncate table OAIB;
truncate table OAOB;
truncate table AOB1;

--- USE THE ABOVE QUERIES FOR THIS INCIDENT ONLY ---

In the case that you receive different results from the above expected results, do not run the queries on the customer productive database. Please return this support incident with all related information and the new database backup to the Global Support Center. Please confirm this incident if the issue was resolved by running the suggested fix.

 



SAP Reference


3340971 - Logon to SAP Business One is Slow for Specific Users with a Large Number of Alerts

https://me.sap.com/notes/3340971  

3246872 - Messages/Alerts Cleanup
https://me.sap.com/notes/3246872

3304423 - Enhancement for the Message/Alerts Cleanup Feature
https://me.sap.com/notes/3304423/E


3284697 - Overview Note for SAP Business One 10.0 FP 2305

https://me.sap.com/notes/3284697